D
D
Default_Nickname2022-02-24 09:22:06
C++ / C#
Default_Nickname, 2022-02-24 09:22:06

How to make it so that when creating an object (Instantiate), it rotates in a random direction?

i create a new object:

IEnumerator Spawn()
{
yield return new WaitForSeconds(2);
Instantiate(//object, //object position, //object rotation);
}

displays an error when rotating an object

, I have a variable for random rotation, but only quaternions can be used in object rotation, I don’t know how to work with them, and there is no proper tutorial on YouTube, can anyone understand this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Black Basher, 2022-02-24
@Default_Nickname

Quaternion.Euler(Vector3)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question