Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question Set Direction from map not working

Discussion in 'Visual Effect Graph' started by mlodinov, Apr 26, 2024.

  1. mlodinov

    mlodinov

    Joined:
    Feb 4, 2014
    Posts:
    10
    I created point cache from regular sphere and I have this simple VFX graph. The problem is that direction from map is doing nothing. I was expecting that particle's forward vector would align with normal vector from point cache but it not. Am I doing something wrong?
    Screenshot 2024-04-26 at 19.10.34.png
     
  2. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,356
    Set Direction does not determine how particle is rendered, instead it sets the particle attribute with name "direction". It's the same with all other attributes like position, size, color, etc.
    Those attributes are often used by default output shader to render them (for example position or color), however not all of them are used this way, especially if you had custom shader.

    The Orient node is used to control how particles are rotated and in your case you could use Advanced mode or Look At Position where target position would be position + direction.
     
    mlodinov likes this.