Sign in to follow this  

Collision reflections

This topic is 4108 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, im trying to get a 2D circle to collide with another stationary circle and go off in a new direction but my maths isn't great. I am able to find the normal vector on the surface of the stationary circle but cant think how to reflect along this line. Any help would be appreciated. Thanks

Share this post


Link to post
Share on other sites
Assuming you have the normal n of the surface of the circle and the direction vector v of your cirvle's movement, you can reflect this movement vector like this:

v' = 2(n*v)*n+v (where n*v is the dot product)

which basically means that you project v onto n and scale it by 2 and add it to your incoming direction vector.

Share this post


Link to post
Share on other sites
Sign in to follow this