Jump to content
  • Advertisement
Sign in to follow this  
baddogj

what do i do after angle.

This topic is 4911 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

Im crearint a pool game, and i already know how to get the angle of the collision between two balls. but, what do i do with it. How do i use the angle to calculate the velocity of the two balls? I have read through my math book and i just cant understand it. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
I am doing something very similar. I could help you better if you let me know if you let me know how you represent velocity vectors (magnitude/angle or x/y).

Share this post


Link to post
Share on other sites
Well, I'll just tell you what I found out thru research:

v1 = velocity of ball #1
v2 = velocity of ball #2
t = position of ball #1 - position of ball #2
n = collision normal (perpendicular to t)

Project v onto n and t. n velocity stays the same after the collision. Figure out the t velocity through this system of equations:

v1m1 + v2m2 = v1fm1 + v2fm1 (Conservation of Momentum)
v1 - v2 = v2f - v1f (Conservation of KE, elastic collision)

Remember, apply each v in the above formulae is actually the t velocity, not the total velocity. I can give you the solutions later (don't have them at the moment). Then, just add vn and the new vt to find the v after collision.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!