Because I'm quite new here with Bmax, there is no need to re-program the functions which come with the Newton examples? eg. I started converting the functions that come with the tutorials for Newton, like this:
But infact all I need to do is what you've done, type Global NewtonApplyGravityForce(Body:Byte Ptr), that's it? Or am I missing something here?
Function PhysicsApplyGravityForce(Body:Byte Ptr) Local mass:Float Local Ixx:Float Local Iyy:Float Local Izz:Float ' NewtonBodyGetMassMatrix (body, &mass, &Ixx, &Iyy, &Izz); NewtonBodyGetMassMatrix(body, Varptr mass, Varptr Ixx, Varptr Iyy, Varptr Izz) ' dVector force (0.0f, -mass * 9.8f, 0.0f); Local force:Float[] = [0.0, Varptr mass * GRAVITY, 0.0] NewtonBodySetForce (body, Varptr force[0]) End Function
But infact all I need to do is what you've done, type Global NewtonApplyGravityForce(Body:Byte Ptr), that's it? Or am I missing something here?