Obi Official Forum
BUG? ObiSolver.parameters.gravity at runtime - Printable Version

+- Obi Official Forum (http://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (http://obi.virtualmethodstudio.com/forum/forumdisplay.php?fid=1)
+--- Forum: Obi Rope (http://obi.virtualmethodstudio.com/forum/forumdisplay.php?fid=4)
+--- Thread: BUG? ObiSolver.parameters.gravity at runtime (/showthread.php?tid=2109)



BUG? ObiSolver.parameters.gravity at runtime - vartech - 24-03-2020

I am trying to modify the gravity parameter of my rope at runtime. In the inspector it updates the gravity accordingly, however the rope does not get affected in game. If I manually modify the gravity in the inspector by typing a number, the rope IS affected. Am I doing something wrong or is this a bug?

Thanks,
Tim


RE: BUG? ObiSolver.parameters.gravity at runtime - josemendez - 25-03-2020

(24-03-2020, 10:56 PM)vartech Wrote: I am trying to modify the gravity parameter of my rope at runtime. In the inspector it updates the gravity accordingly, however the rope does not get affected in game. If I manually modify the gravity in the inspector by typing a number, the rope IS affected. Am I doing something wrong or is this a bug?

Thanks,
Tim

HI Tim,

You have to call solver.UpdateParameters(); to commit the changes to the native lib. This is done automatically when you change any field in the inspector.

cheers,


RE: BUG? ObiSolver.parameters.gravity at runtime - vartech - 25-03-2020

(25-03-2020, 09:24 AM)josemendez Wrote: HI Tim,

You have to call solver.UpdateParameters(); to commit the changes to the native lib. This is done automatically when you change any field in the inspector.

cheers,

Thank you! That solved it!