Obi Official Forum

Full Version: BUG? ObiSolver.parameters.gravity at runtime
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
(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,
(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!