since NewtonBodyCalculateInverseDynamicsForce is not implemented
- Code: Select all
_ASSERTE (0);
return dgVector();
I wrote my own force calculation function like this:
- Code: Select all
// F = m*a
// v = a*t
// a = v/t
// => F = m*v/t
// t = ticks/framerate
// => F = m*v*framerate/ticks
NewtonBodyGetMassMatrix(o.newton, @mass, @ixx, @iyy, @izz);
forceout[0]:=mass*tspeed[0]*framerate/ticks;
forceout[1]:=mass*tspeed[1]*framerate/ticks;
forceout[2]:=mass*tspeed[2]*framerate/ticks;
When the character now pushes a object, one would need more force to move both objects. Is there a function to get the total ammount of foce needed to also push away what is lying in front of my character?