Who should respond to collision: Unit or projectile?
Posted
by
aleguna
on Game Development
See other posts from Game Development
or by aleguna
Published on 2012-11-16T14:38:05Z
Indexed on
2012/11/16
17:18 UTC
Read the original article
Hit count: 243
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?
© Game Development or respective owner