   elastic/plastic collision
  If I detect a collision between two balls for example, I can just change their velocities with momentum and energy conservation.  But what happens with plastic collisions - should I just seperate them a little and then give them the same speed in the final direction?  that seems a little hacky to me, what is the common way to do it?And what would happen if I have two balls - A and B were B is connected to a spring on the left.  Now if A hits B from the right and there's a plastic collision between them then according to what I said above, A and B will move a little to the right, then the spring will push back B to the left and then again a will push to the right....Can someone explain?Thanks.   
Quote:Original post by daniel_i_lIf I detect a collision between two balls for example, I can just change their velocities with momentum and energy conservation.  But what happens with plastic collisions - should I just seperate them a little and then give them the same speed in the final direction?  that seems a little hacky to me, what is the common way to do it?That is exactly what you should do. But not because it's a hack, but because it's what we get from calculations. Collisions are to conserve momentum. About the energy, though- bouncy collisions conserve energy,-  sticky ('plastic') collision loose as much energy as possible. The velocity state of loosing as much energy as possible and conserving momentum at the same time turns out to be to both bodies to have the same velocity.There are some intermediary stages ('bounce factor' between 0 and 1), but they are hard to get the equations right (at least I gave them a try and gave up).Quote:And what would happen if I have two balls - A and B were B is connected to a spring on the left.  Now if A hits B from the right and there's a plastic collision between them then according to what I said above, A and B will move a little to the right, then the spring will push back B to the left and then again a will push to the right....You mean like this:S----------B    A 0  <-v1S----------BA    <-v2   f1->S--------BA  <-v3 f2->S------BA  00 0S----------BA v3->At the moment of collision, they will be having same velocity. But right after that, a force from spring will be issued to ball B (and through it, to ball A, but this is a natural process of some more collisions every frame, without any hacks). So they should move together as long as the spring is issuing a force to the right. After that, ball B will be slowly stopped by spring force and A will move freely to the right. B will be bouncing on the spring forever...   ;  Thanks, so how do you recommend that I determine if the collision is elastic or plastic?  Should I give every mass a "bouncyness" value and then, when collision is detected check the sum of the two values and see if it passes a certain threshhold?Thanks.   ;  Basically, yeah.For example, in an FPS game, player is to collide 'sticky' with a wall. But a thrown grenade is to bounce from the same wall. Should a grenade thrown at a player bounce from him? That's for you to decide, the bouncyness(bounciness?) could be calculated as maximum, minimum, average, etc.It also depends on your colision resolving methodology. Mine, for example, is not so forgiving about sticky collisions or colliding objects with perpendicular velocities, so I use minimum 10% bounce factor everywhere. YMMV.   ;  Thanks!also, is there a way to do plastic collisions with the "penalty" method = when to objects collide put a spring between them and push them appart?Thanks   ;  Hi Daniel,what you are talking about is called inelastic behavior (plastic interactions are slightly different and more complicated to model). A number called the coefficient of restitution, e, is commonly used to control how inelastic an interaction is.The coefficient of restitution is used to model "hard" interactions, where the collision is an instantaneous event that changes the motion of the bodies involved. You can achieve similar results using, what you've called, a penalty method, which changes the motion of the objects over a finite period of time. This is called a "soft" interaction, and is commonly modelled as a spring-dashpot system where the interaction occurs only if the objects interpenetrate.;  Hi, please check out these two forum threads:http://game-physics-engine.foren-city.de/topic,7,-berechnung-des-dreidimensionalen-stosses.htmlandhttp://game-physics-engine.foren-city.de/topic,10,-elastischer-vs-anelastischer-stoss.html