Who should respond to collision: Unit or projectile?
- by aleguna
In an RTS if a projectile hits a unit. Who should handle the collision?
If projectile handles the collision, it must be aware of all possible types of units, to know what damage to inflict. For example a bullet will likely kill a human, but it will do nothing to a tank.
The same goes if unit handles a collision. So either way one of them should be aware of all possible types of the other.
Of course the 'true' way would be to do full physics simulation, but that's not an option for an RTS with 1000s of units and projectiles...
So what are the common practicies in this regards?