Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Resolved Issue with Polar Coordinates Node

Discussion in 'Shader Graph' started by taskmagee, May 19, 2021.

  1. taskmagee

    taskmagee

    Joined:
    Sep 16, 2018
    Posts:
    31
    I feel like I'm loosing my mind. I hope someone can explain to me why this isn't working. I'm trying to create a shader similar to this one.

    https://preview.redd.it/gx5znjbk3lq...bp&s=53329f13c10720033d63faba7698c04b9bcd8600

    The shader itself works fine. But I'm trying to update the polar coordinates center with the player position on a grid using a Vector2 node and a Divide node to get the float value. If I use a Vector2 node and change the values the center moves in the polar coordinate node just as expected and the shader in the editor updates accordingly. But, if I use a Vector2 property and change the values the center will move but the shader won't update in the editor. Can someone explain why this is happening?
     
  2. taskmagee

    taskmagee

    Joined:
    Sep 16, 2018
    Posts:
    31
    Issue solved. Instead of using a vector 2 property. I used two float properties. One for the x position and one for the z position of the player. If anyone can explain why that was happening so I can better understand, that would be great.