Working on a general physics engine

  • Thread starter _Nate_
  • Start date
20
0
I'm working on a general physics engine for fun.

Objects have two velocity vectors: rotation and translation. When a collision is detected, objects are told the point of collision (p) and the object that they hit.

The object decomposes its translational velocity into the component pointing towards p and the orthogonal component. It removes the former component from its own translational velocity and applies the component to the object that it hit. (Scaled, of course, by elasticity, etc)

This goes on to calculate equal and opposite reactions, etc. to simulate physics.

However, I don't know what to do with the rotational velocity when object a hits object b. Say that object a is spinning with a rotational velocity of r, and it hits object b at point p (which is direction u from a's center of mass). How is r applied to b?
 

Related Threads for: Working on a general physics engine

Replies
0
Views
1K
  • Last Post
Replies
0
Views
2K
Replies
0
Views
2K
Replies
0
Views
4K
Replies
0
Views
2K
Replies
0
Views
2K
  • Last Post
Replies
0
Views
1K
Top