Forum Discussion

blimey.tv's avatar
blimey.tv
Member
27 days ago
Solved

How to make a collider for specific players.

We are making a team based game, Your team cannot go to other team's area. So i wanted a collider which gets enabled locally depending your team name. But if i enable a collider locally, all players in the worlds can collide with it.

  • Setting an entities collision to true will set it for everyone. However, you could use a trigger and on player enter trigger check which team they are on, and you can apply a force to the player to push them back if they are on the wrong team. Or you could toggle collision on an invisible object, but this could cause issues if another player on the right team enters at the same time.

2 Replies

  • Hi, 
    Wondering if anyone else might be developing a multi team game and facing similar challenges? We are struggling to find ways to apply rules specific to pre-selected teams and not across the world. We'd appreciate any advice to resolve this issue.

  • Setting an entities collision to true will set it for everyone. However, you could use a trigger and on player enter trigger check which team they are on, and you can apply a force to the player to push them back if they are on the wrong team. Or you could toggle collision on an invisible object, but this could cause issues if another player on the right team enters at the same time.