ctcuff / stargazers

Final team project for CAP 4720
https://ctcuff.github.io/stargazers/
3 stars 2 forks source link

Prevent duplicate collisions #32

Closed Armintron closed 3 years ago

Armintron commented 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.

Finally, do a pass over the map and delete all objects that arent currently colliding this frame to indicate they are no longer colliding.