N
N
NickName73312018-03-10 19:42:27
C++ / C#
NickName7331, 2018-03-10 19:42:27

Unity(C#) - How to specify Vector3.Direction in degrees?

I used to specify the direction using transform.right/up, but now I need to specify a more precise direction, and I decided to google how to do it in degrees, but it didn’t work, I wrote, they say you can’t convert float to Vector3. Thanks in advance for help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Griboks, 2018-03-10
@NickName7331

You googled the translation of float to Vector3, but you needed a math textbook. Scalar and vector are of different nature. You cannot convert one to the other.
How are you going to specify the direction in degrees? 20 degrees is where? In three-dimensional space (Vector3) there should be two coordinates, not one. For example, you can specify the azimuth and elevation.
1) Read a math textbook.
2) Correctly formulate and correct the question.

T
TheTalion, 2018-03-10
@TheTalion

https://habrahabr.ru/post/131931/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question