Obi Official Forum

Full Version: How do I remove Gravity from Obirope at runtime?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Following the grapplehook example and it automatically sets a gravity force of -9.8 on rope spawn, not finding any information on setting this value directly (ideally would like to remove it completely).

Thanks in advance -
(27-02-2020, 09:18 AM)grayjamn Wrote: [ -> ]Following the grapplehook example and it automatically sets a gravity force of -9.8 on rope spawn, not finding any information on setting this value directly (ideally would like to remove it completely).

Thanks in advance -

Hi,

Gravity is a global solver parameter (see:http://obi.virtualmethodstudio.com/tutorials/obisolver.html) To change it at runtime:

Code:
solver.parameters.gravity = Vector3.zero;
solver.UpdateParameters();