Original Post
Hi there. I have made a sphere collision system that returnes a list of collisions. The returned data for each collision in the list is: CollisionPoint in world space Normal for surface collided with So, my problem is now repositioning the sphere after collisions happen. I was wondering if there is a common way of dealing with this. I made some code to do the response myself but it is very long winded and possibly nonsense. Basically i am subtracting the distance between the centre of the sphere and the collision point from the sphere radius. This gives me how far the sphere has penetrated the surface (I think). I then scale the surface normal by the amount of penetration and add the result to the sphere position which pushes it away from the surface. This works when colliding with several surfaces at once as long as they are at 90 degrees to eachother (Like the corner of a room) but if i move the sphere down toward the narrow end of a wedge shaped room it will go through one of the walls. Hope that all makes sense. Any comments would be much appreciated.