MogreNewt functions to set force bug ??

koirat

11-03-2008 18:43:06

I have already made similar post but Im doing it again because there is something more to say. Simply put non of AddForce AddTorque AddLocalForce and Torque(property) is working. I can set velocity and omega without any problem. Are there some settings on the World , Collision class or body class that enable/disable that functions. Is there some issues with MogreNewt and newton compatibility. If you got working example of application in Mogre that are using this functions please post some code here anything will do. As you see I'm desperate here since i would like to use newton library in my applications but I'm loosing my patience here :evil:.
Btw. MogreNewt-Samples that comes with Mogre are working but non of them is using this functions from MogreNewt.

handcircus

03-04-2008 09:45:33

They do all work, but they need to be done in a force callback delegate

eg.

ForceCallbackHandler callback;
callback = new ForceCallbackHandler(UserCallback);
body.ForceCallback=callback;


public void UserCallback(Body body)
{
//code
}

handcircus

03-04-2008 09:46:09

Oh and make sure the delegate is declared as a class variable not just within the scope of the function or you will get crashes!