How to rotate a mesh about forward (z) axis in Shader Graph?
Asked Answered
L

1

0

Is there a way to access object’s local forward direction in shader graph?

I want to rotate my mesh around that axis using Rotate About Axis node. Right now I am rotating my mesh like this.

It only works as long as I keep my Gameobject’s rotation to 0,0,0. So I was planning to get forward axis and feed it into Axis of Rotate About Axis.

Latona answered 16/6, 2023 at 7:27 Comment(0)
P
0

Going out of object-space was unnecessary:

But if you ever need world-space forward direction vector:

Pop answered 13/11, 2023 at 4:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.