How does Box2D calculate angular velocity after a collision?

Here's the place to get help and discuss features. The focus is on the C++ version, but generic questions are welcome.
Posts: 1
Joined: Wed Feb 24, 2016 9:54 am

How does Box2D calculate angular velocity after a collision?

Postby Jose_10 » Wed Feb 24, 2016 10:04 am

Hi all!

I would like to know what are the formulas used to calculate the angular velocity of a circular body after a collision with a wall. I'm developing a Peggle-style game using Unity3D and at some point I need to simulate the physics by myself.

I managed to get a pretty decent approximation for the resulting linear velocity and position, but I'm still struggling to calculate the angular velocity. I found some formulas and tried them all, but the results I'm getting are nothing close to what Unity sets to the rigidbody if I let the physics engine do its own thing. I followed this approach, implementing formula number 7 with no luck at all. Values are not even linearly dependent, so I assume it is not a matter of units of measurement. What am I missing here?

Thanks for your time ;)

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest