11-06-2021, 04:30 PM
(This post was last modified: 11-06-2021, 04:41 PM by josemendez.)
(11-06-2021, 04:12 PM)reuko Wrote: Awesome, your setup above for static and skinned mesh particle spawning seems to have done the trick!
There seems to be an issue with the particles' velocity inheriting the cloth simulation motion (see dropbox link). When the skinned mesh moves around you can see that the particles move in the direction of the parent pivot, but as the cloth flings around the particles aren't following that motion, they sit in place. Is there a way to pass on the simulation motion to the inherit velocity of the dust particles?
video link: https://www.dropbox.com/s/js1ro47q3ma2n2...1.mp4?dl=0
Thanks again!!
Hi Reuko,
Shuriken particles inherit the velocity of the mesh, as a whole. They get it from differences in the transform position (something along the lines of:
Code:
velocity = (meshRenderer.transform.position - old position) / Time.deltaTime;
However Shuriken knows nothing about cloth simulation, so it does not consider individual cloth particle velocities. This is something you'll have to implement yourself.
Obi lets you retrieve any property of each individual cloth particle, including its velocity. See:
http://obi.virtualmethodstudio.com/tutor...icles.html
Using that, you can determine the barycentric coordinates of each Shuriken particle when it is spawned, grab the velocity of the 3 corresponding cloth particles, and interpolate a velocity value for the Shuriken particle.