I have a VFX Graph related question, what i want is when the skinned mesh is moving, add the movement itself (i mean not the game object, but the mesh triangle movement! ) to the VFX generated force.
In details, let’s say by default, there is no animation on the skinned mesh.
I can sample a mesh triangle that emits a particle, which goes from point A to point B driven by simkind of force.
How do I add the displacement vector of the mesh triangle (which is caused by the animation ) to the (B-A) vector, driven by the force?
I already managed to cache the mesh triangle that emits the particle, and sample it for the update context, but i cant figure out how to add the force.
What could help you achieve what you are looking for is to get the sample Vertex/Triangle velocity.
For this, just select your sample Skinned Mesh operator and look in the inspector.
The output section lets you choose what data you want to get.
You should find the velocity and other helpful data.
Thank you for the reply, i completely missed those options!
I added the mesh velocity, but i think it is adding too much velocity? (iam not sure, but i uploaded a video what happens on animation)
I mean, could it be the Update cycle is calculating faster than 1 frame of the animation happens, and keep adding the velocity to the particles, multiple times. (If i step the animation by one frame, the partilces still burst out, before gettingback to the original position.) And if i overwrite the velocity, it will overwrite the force calculation too, aka the all of the particles are stick to the surface of the triangle.
You are “adding” to the current velocity in the “Update” context. The update context is executed every frame. This means that your Velocity will escalate pretty quickly. You can multiply the outputted velocity of your Mesh by the delta Time, this should help keep it under control.
I think it through again, and i found another aproach beside velocity, with only the current and previous position of the sampled mesh triangle (just suddenly clicked in my mind):