How to use sim.handleflag_resetforce ?

Typically: "How do I... ", "How can I... " questions
Post Reply
quangkhieu
Posts: 4
Joined: 29 Feb 2024, 01:33

How to use sim.handleflag_resetforce ?

Post 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!

fferri
Posts: 1230
Joined: 09 Sep 2013, 19:28

Re: How to use sim.handleflag_resetforce ?

Post by fferri »

Code: Select all

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

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: How to use sim.handleflag_resetforce ?

Post 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

Post Reply