Jump to content
IGNORED

Collision Physics


Karl G

Recommended Posts

Does anyone have a good reference for simple collision physics for game developers? My particular interest right now would be what you could call "billiard ball physics" - Two round objects colliding on a 2D plane. I want to figure out how the velocity of each colliding object is affected by the collision. Presumably this depends on the angle of the collision, and I could always have pre-calculated data in data tables if the math for it is too hairy.

Link to comment
Share on other sites

I have no practical reference for gaming billiard physics, but at it's heart the collision physics boil down to Pythagoras. (alternative doc here) The key to that is the collision calculations are done in terms of velocity vectors, rather than any sort of independent x,y velocity components. You'll probably need to "rotate" both vectors so one vector is oriented as a baseline, for the trig table lookups, and then un-rotate the resulting vectors to get the proper orientation. (and then you can convert the velocity vectors to x,y velocity components, for frame-to-frame position updates.)

 

The devil is in the details, of course. Maybe someone else will have a clearer roadmap, or some clever shortcuts.

  • Thanks 1
Link to comment
Share on other sites

One Lone Coder has a good video (and subsequent video) handling billard physics.

He does all the work in C++, but the equations are based off Elastic Collisions 

https://en.m.wikipedia.org/wiki/Elastic_collision

 Or you might check GameDev stack exchange.

https://gamedev.stackexchange.com/questions/7862/is-there-an-algorithm-for-a-pool-game

 

 

 

 

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...