Jump to content

  • Log In with Google      Sign In   
  • Create Account

Calculate direction vector after collision


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
5 replies to this topic

#1 Slig Commando   Members   -  Reputation: 364

Like
0Likes
Like

Posted 01 March 2013 - 07:49 PM

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?

#2 DT....   Members   -  Reputation: 487

Like
0Likes
Like

Posted 01 March 2013 - 11:39 PM

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



#3 EWClay   Members   -  Reputation: 659

Like
1Likes
Like

Posted 02 March 2013 - 02:03 AM

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.

#4 Bacterius   Crossbones+   -  Reputation: 12841

Like
0Likes
Like

Posted 02 March 2013 - 05:07 PM

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


#5 EWClay   Members   -  Reputation: 659

Like
0Likes
Like

Posted 02 March 2013 - 06:51 PM


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.

#6 Bacterius   Crossbones+   -  Reputation: 12841

Like
1Likes
Like

Posted 04 March 2013 - 06:01 PM

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





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.




PARTNERS