Sign in to follow this  
NightMonkey

Collision reflections

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

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