Is this a BUG or just not possible?
#9
(06-03-2019, 05:00 AM)tyFlow Wrote: So I looked into this closer and it turns out the alignment isn't a bug.

The problem is this:

PhysX introduces both linear and angular momentum to particles. Linear momentum is assigned as velocity, angular momentum is assigned as spin.

When you do your particle switch (deactivate), the particles are no longer processed by the PhysX engine, but the vel/spin attributes are not cleared (which is desirable in most cases). In your case, the residual PhysX velocity on the deactivated particles is quickly overtaken by the Find Target velocity changes. However, nothing changes the residual spin values, which is what is skewing your rotations (because spin is integrated at the end of the time step).

So basically your particles are inheriting some PhysX angular velocity (spin) and then that spin is being integrated into the final particle transforms at the end of the time step, after the particles are perfectly aligned to their Find Target location, resulting in the offsets.

Easy fix: just add a Stop operator to the Find Target event, and stop the spin values. Or add a slow operator and slow the spin magnitude to zero over time.

Thank you so much tyFlow! That's very kind of you. Smile 

Well, now that you explained it, it makes sense. I'll try it your way and see if it works.

Thanks again!
  Reply


Messages In This Thread
Is this a BUG or just not possible? - by Johncro - 05-30-2019, 10:30 AM
RE: Is this a BUG or just not possible? - by Johncro - 06-03-2019, 12:07 PM

Forum Jump: