Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved How to make a Mesh always face outward when rotating around a specific point in VFX Graph?

Discussion in 'Visual Effect Graph' started by lepx, Dec 4, 2023.

  1. lepx

    lepx

    Joined:
    Aug 10, 2023
    Posts:
    6
    Hi, I'm trying to use VFX Graph to generate Mesh particles and have them rotate around a central point. However, initially, when the Mesh particles rotate around the center, they don't rotate on their own; their angles are fixed.

    I want the Mesh particles to always face outward from the center, so I used Orient: Look At Position, which did work to make the Mesh particles face a specific point. However, during the rotation, the Mesh particles still rotate on their own at certain moments.



    I'm quite confused, and this has been bothering me for several days. I've searched a lot of information but haven't found a complete solution. I'm reaching out to ask if anyone can guide me on how to resolve this. Thank you!

    This is my VFX Graph.

    rotate porblem.png




    Even with Look At Position, does the self-rotation of the Mesh during its revolution still seem influenced by the camera?
     
    Last edited: Dec 4, 2023
  2. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,065
    Can you make bigger screenshot, It will be easier for us to help you.
     
  3. lepx

    lepx

    Joined:
    Aug 10, 2023
    Posts:
    6
    I re-uploaded the image. It's my first time posting, and I'm not familiar with the process. Apologies for any confusion...
     
  4. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,065
    I got two separate option for you.

    The upper one is using LookAt operator. (I'm doing it in Update Context but it can be used in Output also)
    The lower one is using the same block as you are using but in Advanced mode.

    Both are untested but they should get you going.
    If you do not need rotation for some other calculation I would use bottom version.


    RotatingParticles.png
     
    OrsonFavrel likes this.
  5. lepx

    lepx

    Joined:
    Aug 10, 2023
    Posts:
    6
    I've successfully resolved it using the second method. Thank you!!!!
     
    OrsonFavrel and koirat like this.