So that the object would not

Member
Posts: 131
Joined: 2010.08
Post: #1
When collision detection is done and the object's next position would be partly inside a wall, the position would be set as 2*penetration away from the wall. However, what is the best way to do collision detection if there is a possibility that the new position would be inside another object, and reflecting off that would put its position again in the wall, so that the object would not stop moving between the wall and the other object?
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #2
This is the sort of thing that physics engines handle for you, contact with multiple surfaces. Otherwise you have to iteratively/recursively handle the collision response.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Post Reply