Closed Armintron closed 3 years ago
Gameobjects that pass though eachother collide numerous times, once for each frame they collide. We only want to collide once on initial impact.
Logic: Can be implemented by adding a map to each Physics object that keeps track of what was collided with in the previous frame.
Physics
Finally, do a pass over the map and delete all objects that arent currently colliding this frame to indicate they are no longer colliding.
Gameobjects that pass though eachother collide numerous times, once for each frame they collide. We only want to collide once on initial impact.
Logic: Can be implemented by adding a map to each
Physics
object that keeps track of what was collided with in the previous frame.Finally, do a pass over the map and delete all objects that arent currently colliding this frame to indicate they are no longer colliding.