VFX Graph (and technical art) novice here - I’m trying to get a mesh position working on VFX graph and I’m running into some blocks. I’m basically, more or less, having the same issue on both MeshRednerer and SkinnedMeshRenderer positions - i.e. they’re not really aligning up. This is my configuration and the result thereof.
I have tried with both my position addition and without everything, but seems like the effect always spawns at the (0, 0) of the object. I was able to get some more variance with skinned mesh earlier, but I am now unable to reproduce it - also, it wasn’t accurate to the world position of the skinned mesh.
Am I doing something obviously wrong here? How do I get these particles to actually spawn on the mesh?
I think there are two parts to this.
The first is that the meshes are probably not read/write enabled. Check the bottom of this page for more details.
Another thing you might find is that if you sample a mesh, it’s sampling the mesh asset itself, and not the transform of the mesh that you have in the scene. So in your axe scenario, if you want to move / rotate your axe away from the world origin, you might want to use a property binder to orient the particles to a new position/rotation that matches the axe’s.
And lastly, you can find a small sample of a skinned mesh renderer setup here which can answer some other questions that might pop up.
Thanks Vlad! This is amazing, I will give it a shot. I did not realize the meshes need to be Read / Write enabled - I’m 99% sure they’re not (needed to enable for some other ones for dynamic transformation recently).
The “Add” on the graph above was meant to offset the spawn position to match that of the world position, but I’ll check out the property binder and the example given. I reckon I should be able to make it work.
Finally got it to work. As the next to last problem, I had the VFX graph parented to the game object that was moving to transformations got applied twice… Took me a while to realize it.
The last problem I have now is that because the particle system spawning follows the player, but the VFX itself does not, it gets culled once you move away too far. I reckon it’s a matter of figuring out offsets somehow and attaching it to something but almost there.
Again, can confirm that what you said helped! My issue was all of those things.
Or if your camera is tagged as MainCamera, you can just make your bounds follow it around (I think this might only work in the game view, as the scene camera is different):
(if you have the position of the object you are tracking, you can also just plug it directly in there as well, this way no matter where the VFX transform is, the bounds will follow whatever you chose (camera, some transform in the scene, etc.) and be always visible)