Page 1 of 1

How to use sim.handleflag_resetforce ?

Posted: 29 Feb 2024, 02:04
by quangkhieu
Hello!

I've have some problem with object pushing,
I use sim.addForce to create force that applies on object, and document says that Added forces are cumulative,... and are reset to zero by using the following flag: sim.handleflag_resetforcetorque. How can I use this flag ?

Thanks!

Re: How to use sim.handleflag_resetforce ?

Posted: 29 Feb 2024, 09:20
by fferri

Code: Select all

sim.addForce(shapeHandle | sim.handleflag_resetforcetorque, pos, force)

Re: How to use sim.handleflag_resetforce ?

Posted: 04 Mar 2024, 17:02
by coppelia
Keep in mind that forces/torques are cumulative, but at the start of a new simulation step, those will be reset automatically.

Cheers