+Karl G Posted July 11, 2020 Share Posted July 11, 2020 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. Quote Link to comment https://forums.atariage.com/topic/308968-collision-physics/ Share on other sites More sharing options...
RevEng Posted July 11, 2020 Share Posted July 11, 2020 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. 1 Quote Link to comment https://forums.atariage.com/topic/308968-collision-physics/#findComment-4583296 Share on other sites More sharing options...
+Karl G Posted July 11, 2020 Author Share Posted July 11, 2020 Thanks. I figured it wouldn't be as simple as I was hoping, but I'm sure the final result would make it worth the effort to try to get it right in the end Quote Link to comment https://forums.atariage.com/topic/308968-collision-physics/#findComment-4583301 Share on other sites More sharing options...
CapitanClassic Posted July 14, 2020 Share Posted July 14, 2020 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 4 1 Quote Link to comment https://forums.atariage.com/topic/308968-collision-physics/#findComment-4585212 Share on other sites More sharing options...
Recommended Posts
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.