Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Setting velocity to 0
#4
(08-12-2025, 12:12 AM)Aroosh Wrote: Hello Jose,

I appreciate the prompt response to my query. 
I understand that setting the inverse mass to 0 would ensure that particles are not being affected by forces/accelerations acting upon the object, hence freezing the particles. 
That would also mean that the next time there are forces/accelerations applied to the object, the particles will stay frozen until I explicitly set the inverse mass to a non 0 value.

Correct. The usual way to do this is to store the inverse mass of the particle in a helper variable, and set the inverse mass to zero. Then once you want the particle to resume movement, set it back to the value stored in the helper variable.

(08-12-2025, 12:12 AM)Aroosh Wrote: That being said, a better way to frame my question would be is there any way I can access the data structure holding the forces/accelerations so I can explicitly set them to 0?

You could find *all* constraints affecting the particle(s) and disable them. This is considerably more complex (and costly) than dealing with the particle's inverse mass, though, as it involves iterating trough every constraint in every batch of every type of constraint and find those that reference a specific particle. Let me know if you need help with this.

Kind regards,
Reply


Messages In This Thread
Setting velocity to 0 - by Aroosh - 06-12-2025, 09:37 PM
RE: Setting velocity to 0 - by josemendez - 07-12-2025, 12:35 PM
RE: Setting velocity to 0 - by Aroosh - 08-12-2025, 12:12 AM
RE: Setting velocity to 0 - by josemendez - 08-12-2025, 09:24 AM
RE: Setting velocity to 0 - by Aroosh - 20-12-2025, 01:06 AM
RE: Setting velocity to 0 - by chenji - 22-12-2025, 04:29 AM
RE: Setting velocity to 0 - by josemendez - 22-12-2025, 08:38 AM
RE: Setting velocity to 0 - by Qriva0 - 22-12-2025, 11:26 AM