Search Unity

Attach Particles to specific mesh Position so they rotate with it

Discussion in 'Visual Effect Graph' started by AidensAssets, Jun 8, 2022.

  1. AidensAssets

    AidensAssets

    Joined:
    Feb 10, 2021
    Posts:
    5
    So I've been trying to do this for around 3 days.. all I'm trying to figure out, is how I can attach these 4 particles to the bottom of this rotating mesh, the current method I'm using to rotate the particles is so finicky I'm rotating on values of -0.0057 and its also inconsistent it seems to be rotating at a slightly different speed every time so it lines up sometimes, and some rotations it doesn't, I found it was easily done in Shuriken with the burst speed option in around 5 minutes, having 4 ribbons set in the exact location I wanted them, but I cannot use Shuriken for our project since its in HDRP

    I did attempt to recreate it inside vfx graph using the ribbon system but getting the 4 ribbons to go to a transform point seemed rather confusing compared to Shuriken.

    Here is a link to what I have working right now in VFX Graph
    https://media.giphy.com/media/2zYx0WUwlUjiLoVPp0/giphy.gif

    This is what I managed to create in Shuriken in around 10 minutes, (ignore the textures its just this movement I'm after)
    https://media.giphy.com/media/y5ktS4LaGhgRJoorhz/giphy.gif

    I'd really appreciate any help if possible, I'm pulling my hair out over here lol.
     

    Attached Files:

  2. Peplm

    Peplm

    Joined:
    Aug 2, 2019
    Posts:
    19
    Hello ! What you could do is make your fx in the hierarchy a child of your rotating mesh. So it's going to follow the same rotation.
     
  3. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    As he said, you can attach it as child, but this problem sounds so trivial that we might be missunderstanding something - in such a case you might need to tell us a bit more.
     
  4. AidensAssets

    AidensAssets

    Joined:
    Feb 10, 2021
    Posts:
    5
    So with VFX graph, if I make a second, with the orbs, I can just parent it and it'll rotate? dame I feel stupid I'll try it tomorrow morning and see if thats what I'm looking for.
     
  5. AidensAssets

    AidensAssets

    Joined:
    Feb 10, 2021
    Posts:
    5
    I'm doing the rotation inside the VFX graph so if I parent the second particle system it does not follow the rotation of the Mesh in the vfx graph.

    Here is some reference, for what I'm trying to achieve
    https://media.giphy.com/media/DTylXnnCmHcQCtGHtQ/giphy.gif

    I'm trying to get the orbs to follow the lightning here
    https://giphy.com/gifs/mKHeBqRmNwSHdG41GA

    I understand if its parented and I rotate it in the viewport it follows... but I'm trying to get them to follow the Mesh rotation I've created with the Set Angle XYZ Inside the VFX Graph
     
  6. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    I kind of understand, but can't see the problem. You can add both systems into single graph and use the same amount of rotation for orbs and thunders. You can even use graphics buffer to put orbs anywhere you want and snap electricity to these points - I think there is sample project somewhere with the turret demo, the one you can see in the picture here in Graphics/Compute Buffer Support section.
    Also, the reason why your orbs are desynchronized is that you are not using delta time to rotate your particles, you just used fixed amount every frame, but frame rate and duration is not the same all the time.