Sign in to follow this  
shrtysk8r1

Sliding Collision Reponse

Recommended Posts

I am trying to implement a sliding collision response algorithm. The collision tests work fine - I'm using the external library ColDet. First, I create the bounding sphere for the player - which is just the camera position with an arbitrary radius of 20. Each frame, after moving the character according to input, I check for the collision of the world with the sphere generated as described above. Upon a collision, I have the following information: O - The position of the camera before any movement occurred, Q - The collision point as returned by coldet, N - The normal of the surface that collided with the sphere, C - The current position of the camera. I've tried several things - the only thing that seems to work 'OK' is to just set the new camera position to be Q + (20 * N) - and continue this check until no collisions occur. However this leads to problems in a number of circumstances. For instance when pushing back along the surface normal causes another collision. If anyone could please help me out with this problem it would be greatly appreciated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this