Collision filtering by object, team
- by Bill Zimmerman
Hi,
I am looking for a good method to determine which objects will be considered for collision with other objects.
My current idea is that each object has the following properties:
alwaysCollidesWith = [list of objects that will always trigger a collision check]
neverCollidesWith = [lost of objects that will never be considered]
teamCollidesWith = [list of objects that will be checked, provided they belong to a different team]
For example:
-projectiles never have to be checked for collisions with other projectiles
-players are always checked for collisions with players, regardless of team
-projectiles are only considered for collisions if they collide with another teams players
Does anyone see any weaknesses with this approach? Can anyone recommend a better approach?