Problem controlling Newton.

BlitzMax Forums/BlitzMax Programming/Problem controlling Newton.

Ok, the force was added when I set a value to the force at the begining of the game. My input code changes the values for force.
The mesh still does'nt move with input.
The post I found was about the same problem. They solved it with NewtonbodySetFreeze and NewtonWorldSetAutoFreeze. The post was in C++, I don't know where and how to implement it.

Here's my force and torque function.
Function  PhysicsApplyForceAndTorque (Body:Byte Ptr)
	Local Mass:Float
	Local IXX:Float
	Local IYY:Float
	Local IZZ:Float
	Global ForceX:Float = 0.0
	Global ForceY:Float = 0.0
	Global ForceZ:Float = 10.0
	
	'The mesh only moves if the values if they are preset.
	Global ForceX:Float
	Global ForceY:Float
	Global ForceZ:Float
	Local Force:Float[] =  [-mass * ForceX, -mass * ForceY, -mass * ForceZ]
	Local Torque:Float[] = [TorqueX, TorqueY, TorqueZ]
	NewtonBodyGetMassMatrix (Body,Varptr Mass, Varptr IXX, Varptr IYY, Varptr IZZ);
	NewtonBodyAddForce (Body, Varptr Force[0])
	NewtonBodyAddTorque (Body, Varptr Torque[0])
End Function