Search Unity

Need help with VFX Graph Target Position

Discussion in 'General Discussion' started by Boingloins, Apr 1, 2021.

  1. Boingloins

    Boingloins

    Joined:
    Feb 9, 2021
    Posts:
    7
    I watched a VFX Graph video tutorial for Attractive Force, but it only attracts particles to a single point. I was wondering if there was a way to attract particles to an entire mesh.

    Any help would be much appreciated.
     
    scarscarin likes this.
  2. scarscarin

    scarscarin

    Joined:
    Apr 5, 2019
    Posts:
    23
    Hey! Sounds interesting, do you have a screenshot of your vfx graph? It might be that you want to replace to vector3 giving out your force's position with an array of vector3s taken from the mesh's vectors
     
  3. Boingloins

    Boingloins

    Joined:
    Feb 9, 2021
    Posts:
    7
    Desktop Screenshot 2021.04.05 - 11.28.16.90.png

    The graph itself isn't anything special, and the nodes on the left are pretty much an exact copy of the Attractive Force video tutorial.
     
  4. scarscarin

    scarscarin

    Joined:
    Apr 5, 2019
    Posts:
    23
    Have you tried using signed distance fields?

    You could use a mesh-to-sdf converter and apply a signed distance field conformer or collider node

     
  5. Boingloins

    Boingloins

    Joined:
    Feb 9, 2021
    Posts:
    7
    Thanks a bunch!

    This video also led me to some other methods that may be worth a shot as well. I haven't had time to test any of them yet though, but I'm definitely looking forward to it!