22-12-2025, 08:38 AM
(This post was last modified: 22-12-2025, 08:56 AM by josemendez.)
(20-12-2025, 01:06 AM)Aroosh Wrote: I would like a function that I can call at an arbitrary frame which would preserve the current positions but will clear the velocities given there are no collisions happening so that the particle(s) do not move until and unless external stimulus is applied to them again which could be collision/gravity/wind etc.
I’m not sure I understand, what you describe is accomplished using what I assume is yout original code:
solver.velocities[index] = Vector4.zero;
Note that external stimulus is usually applied every frame (gravity for instance), so the particle would immediately start moving again after calling this function unless it’s in a vacuum, zero gravity environment.
In case you’re already removed all external stimulus (zero gravity, zero wind, zero inertial forces, etc) then this code should do what you’re after.

