Calculate direction vector after collision

Started by
4 comments, last by Bacterius 11 years, 1 month ago
So I am trying to figure how to properly identify an objects new direction after colliding with another object. So if I know a bodie's acceleration, velocity, direction it is moving, ect..., how would you go about this? Say a ball is moving towards a wall, I im not sure which direction to apply force at the collision point to that body. I am sure it has something to do with the dot product of the two colliding bodies, but can anyone give some insight?
Advertisement

http://www.essentialmath.com/GDC2012/Richard_Tonge_solvingRigidBodyContacts.pdf

For a wall, it's easy. The force direction is always the wall's normal vector (neglecting friction).

For other bodies the force direction depends on the shape and the point of contact.

The velocity of the bodies after collision depends on the masses of the bodies and the restitution, as well as the contact normal. But again, for a perfectly bouncing ball against a wall the solution is easy: reverse the component of velocity along the wall's normal vector.

The velocity of the bodies after collision depends on the masses of the bodies and the restitution, as well as the contact normal. But again, for a perfectly bouncing ball against a wall the solution is easy: reverse the component of velocity along the wall's normal vector.

Gravity still applies while the wall and ball are in contact. This is irrelevant for rigid collisions but becomes important for other types of collisions (notably, soft-body).

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”


The velocity of the bodies after collision depends on the masses of the bodies and the restitution, as well as the contact normal. But again, for a perfectly bouncing ball against a wall the solution is easy: reverse the component of velocity along the wall's normal vector.


Gravity still applies while the wall and ball are in contact. This is irrelevant for rigid collisions but becomes important for other types of collisions (notably, soft-body).

Gravity is quite far down the list of effects to consider. Given the nature of the question, I'm sure frictionless rigid bodies is a good starting point.

Gravity is quite far down the list of effects to consider. Given the nature of the question, I'm sure frictionless rigid bodies is a good starting point.

I was just highlighting that other forces don't suddenly stop acting upon collision, and must still be considered (and added to the collision response force properly) if the collision time is nonzero (for rigid bodies, it is zero, which is why I said that this is irrelevant for rigid collisions). So in fact gravity is not even on the list of effects to consider.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

This topic is closed to new replies.

Advertisement