# How to determine velocity after a collision?

This topic is 2272 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi,

I am working on a simple hockey game and I have come to the stage where I need to handle collisions between the puck and the ice, boards, posts etc. What I need help with is how do I determine the velocity after a collision? The velocity is a vector and I have a method for reflecting it which means the puck will bounce. However right now when a puck is shot high in the air and eventually drops down onto the ice again it will bounce and reach approximately the same height on each bounce (if I ignore air resistance). As anyone who watches hockey knows the puck hardly bounces at all (for simplicity I will assume the puck always lands flat) when it hits the ice. How do I calculate this loss of velocity? Do I need to calculate energy loss or something? Any help would be appreciated, not sure what to google for. If I need to provide more information let me know.

##### Share on other sites
I can't recall the technical terms, but I believe your issue is about physics materials. Your puck seems to be acting like a rubber ball with 100% elasticity. I gather that a puck would have a very low elasticity, e.g. 5%. This means that every collision 95% of the motion in the direction of the collision normal would be transferred to the object that it collides with. In the case of collision with the ground, you can assume that energy is just lost because The Earth Is Very Heavy (TM). The other 5% would turn into bounce. For practicality you may choose to zero out the vertical component if it's under a small amount.

##### Share on other sites
I did some more googling and managed to find something called Coefficient of restitution: http://en.wikipedia...._of_restitution, perhaps this is what you were referring to? It says:

For an object bouncing off a stationary object, such as a floor:

, where

is the scalar velocity of the object after impact
is the scalar velocity of the object before impact
[/quote]

Some more googling led me to this document http://www.dissertat...rson_042308.pdf, it says:

## The result looks pretty good, does this look correct to any of you guys?

##### Share on other sites
I have looked around a bit more and I've seen examples of implementations where only the vertical component of the velocity vector is affected by the coefficient of restitution; the horizontal component is only affected by friction. Is this correct? If so my code above is incorrect and it would explain why my puck slows down so much horizontally when it bounces. But I am not sure the angle of the bounce is correct if only the vertical component is affected by COR. Could anyone clarify this please?

The last line above would be this instead:
 velocity.Y = 0.267 * velocity.Y; 

##### Share on other sites
I imagine that Cr would be affected by shape and thickness, so it bounces much less vertically than horizontally because it's thin and flat in that direction. Make sense?

1. 1
Rutin
24
2. 2
3. 3
JoeJ
20
4. 4
5. 5

• 9
• 46
• 41
• 23
• 13
• ### Forum Statistics

• Total Topics
631748
• Total Posts
3002030
×