08-04-2024, 07:56 AM
(This post was last modified: 08-04-2024, 07:59 AM by josemendez.)
(06-04-2024, 07:35 PM)kodra Wrote: The API document of ObiSoftbody has this description:
I wonder what "fixed particles" and "active particles" are, as I can't find a way to paint a particle fixed or active in the blueprint editor. Does "fixed" just mean the particles attached by ObiParticleAttachment, or are they two different things?
Fixed particles are particles that have had their inverse mass set to zero.
This basically gives the particle infinite mass, which makes it ignore forces (since a = f/m) and is used to override the particle's position. Static ObiParticleAttachments do this, but you can also fix particles in place programmatically.
Particles in Obi can be either active or inactive. Active particles are part of the simulation, inactive particles are not. This is used to avoid having to allocate/free memory at runtime: actors can preallocate a specific amount of particles, the activate/deactivate them as needed. This is not used by softbodies yet, but used extensively by fluid emitters, tearable cloth, and ropes. In case you write custom code for softbodies that activates/deactivates particles (for instance, custom tearing/breaking) it's important to call UpdateParticleProperties() afterwards.