Sign in to follow this  

Calculate direction vector after collision

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

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites


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.

Share this post


Link to post
Share on other sites

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.

Share this post


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