Simple rigid body collision reaction

Click For Summary
SUMMARY

The discussion focuses on implementing a rigid body collision reaction in a physics engine, emphasizing the importance of Newton's third law, which states that colliding objects exert equal and opposite impulses. The user has previously used a simplistic teleportation method for collision resolution but is now seeking a more accurate approach involving impulses based on the masses and velocities of the objects. Key challenges include determining the correct impulse to apply and addressing issues with the A posteriori (Discrete) model, particularly regarding interpenetration of objects during collisions.

PREREQUISITES
  • Understanding of Newton's third law of motion
  • Familiarity with rigid body dynamics and collision detection
  • Knowledge of impulse and force calculations in physics
  • Experience with discrete time simulation models
NEXT STEPS
  • Research impulse calculation methods for colliding objects
  • Learn about collision surface concepts and their implementation
  • Explore alternative collision resolution techniques beyond teleportation
  • Investigate continuous collision detection methods to prevent interpenetration
USEFUL FOR

Game developers, physics engine programmers, and anyone interested in implementing realistic collision responses in simulations.

Nanako
Messages
39
Reaction score
0
Simple rigid body collision reaction (Newton III)

Hi everyone! I'm writing a physics engine as part of a game I'm making. Up until this point I've implemented inter object collisions in a rather quick and dirty manner. Whenever something moves into something else, it is simply teleported back out to the edge. This implementation worked for a while, but amongst other problems, it causes anything not currently moving to be an immovable object, which is not good.

I already have written support for forces and impulses (and friction), and i believe this is the more correct way to go. I had a long discussion with a friend who educated me a bit on the subject. I understand that Newton's third law is integral here. that any two colliding objects have an equal(but opposite) impulse applied to them, and that this impulse is dependent on their relative masses and velocities

he also talked a lot about the concept of a collision surface, which is something i didn't get quite as well. I understand it to be a point between the two objects, that is weighted according to their masses, and that travels in a straight ttrajectory

At this point, i feel that I've got a handle on the basics. I'm not certain exactly what to do, but i feel i'd be able to understand it if i had a little more help . So i come to you wonderful people hoping for a little assistance in that regard.

essentially, i need to figure out what impulse to apply to a colliding pair of objects.

in addition, there's a problem that i don't fully understand. I've designed my engine using what i now now to be the A posteriori (Discrete) model, which means that it processes things in discrete frames, moving all objects, resolving collisions and altering velocities, before moving them again at the start of the next frame.

An issue i see with this model is that when two objects collide, they are inside each other. And if I'm going to be using impulses to move them out again, there does seem to be the possibility of them not colliding with enough energy, so that the impulse isn't strong enough, so that the objects are STILL interpenetrating after being moved in the next frame. This would lead to the impulse being applied multiple times, which is not good. I'm wondering if it would be best to keep my current approach of teleporting things out as well, but adapt it to move the objects to relative positions based on the collision surface (essentially fastforwarding their motion through however many frames it would take to make them stop colliding). does that make sense or seem bad ?

Any advice in these matters is appreciated.
 
Last edited:
Physics news on Phys.org
bump! can anyone help? maybe i should have tried the general physics forum :(
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 61 ·
3
Replies
61
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K