Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Resolved Moving Effect in Wolrd Space

Discussion in 'Visual Effect Graph' started by liambilly, Feb 5, 2024.

  1. liambilly

    liambilly

    Joined:
    May 13, 2022
    Posts:
    154
    help me ou guys
    so i parented my visual effect to my player., because it doesnt play when itt is out of cameara frustrum
    it is spawned from his skinned mesh.
    now the problem is it doesnt move in world space. it stays static; when i convert local to world it starts moving away from the player how should i handle this
     
  2. OrsonFavrel

    OrsonFavrel

    Unity Technologies

    Joined:
    Jul 25, 2022
    Posts:
    194
    Morning.
    You can set it up in different ways. The way I prefer to do it is to do everything in World Space.
    So, first I will be sure to put my "Systems" in World Space. To do so you can click on the "World/Local" tag on of the Context of your system.


    upload_2024-2-6_9-53-46.png


    Then, I usually use the Set Position on Skinned Mesh node, as it's packed with handy features like the ability to orient your particles on the Mesh Surface. On this node, make sure to "Apply World Root Transform".
    upload_2024-2-6_9-57-22.png

    Now, you can either update the "Transform" of your System's Bound based on your SkinnedMesh transform, or more simply as you're doing it, parent your VFX asset to the Skeleton.

    upload_2024-2-6_10-2-9.png

    Unity_jtPar4NUzM_0076-0159_1000x601.gif

    I'm joining a simple VFXG to help you get started.

    Note that, you can also import the VFX Graph learning sample package from the package manager.
    Package Manager > VFX Graph > Samples > VFXG learning samples
    In here you'll find two scenes, one for HDRP and the other for URP. Those scenes are packed with examples to help you learn VFX Graph features.


    One of them is dedicated to Skinned Mesh sampling : > Sample Skinned Mesh.prefab
    It hasn't been thought for moving characters, but you can easily change the parenting in the scene view and turn on the "apply root motion" on the character to make it work with moving characters. This way, you now have two VFX examples of skinned mesh sampling: one in World Space and the other in Local Space.
    Unity_yndvaxZGUA_0031-0154_1000x539.gif
    The Feathers are on the back of the creature are VFX Graph particles.
    I hope this will help. Have a lovely day.
     
    FredMoreau likes this.
  3. OrsonFavrel

    OrsonFavrel

    Unity Technologies

    Joined:
    Jul 25, 2022
    Posts:
    194
    Forgot the Character Trail VFX package...
    Here it is.
     

    Attached Files:

  4. liambilly

    liambilly

    Joined:
    May 13, 2022
    Posts:
    154
    thank you this was helpful
     
    OrsonFavrel likes this.