D
D
Dmitry Korolev2018-08-13 23:40:31
Unity
Dmitry Korolev, 2018-08-13 23:40:31

How to rotate any normal 45 degrees left or right?

i have an arbitrary normal in vector3
i need to rotate it with respect to y by 45 degrees
which function to use for that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Basmanov, 2018-08-14
@adressmoeistranici

Create a quaternion with the desired rotation using Quaternion.Euler or Quaternion.AngleAxis and multiply by the normal to get a rotated vector as the output.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question