Page 1 of 1
How to find the acceleration of an entity
Posted: Wed Oct 14, 2015 4:39 pm
by yanbo2u
Say i have an entity that is affected by many other entities and constrains. I need to find the overall acceleration of all impulses (in different directions) that are applied on this object, something to imitate the acceleration sensor.
by the way, I also need to find the impulses from revolute motors.
Re: How to find the acceleration of an entity
Posted: Wed Oct 14, 2015 6:55 pm
by Norbo
The engine doesn't track acceleration, but it can be derived from the change in velocity from one time step to the next (e.g. acceleration = (currentVelocity - previousVelocity) / dt).
The impulse applied in the previous frame by a revolute motor can be found in its TotalImpulse property. That value is in constraint space, so it's just a scalar representing the angular impulse around the constraint axis. If you want the world space angular impulse, multiply by the jacobian (GetAngularJacobianA/B).