- Home /
The question is answered, right answer was accepted
Trouble understanding Quaternion.identity in tutorial
In the Space Shooter - Game Controller tutorial: Right at the end of the video, it says to initialize the rotation to Quaternion.identity, which means "no rotation", and then the guy in the video proceeds to show how that causes the demo Asteroid objects to tumble and rotate. What? How does setting something to "no rotation" cause it to rotate?
Answer by Eric5h5 · Feb 04, 2014 at 11:32 PM
It doesn't; the two things have nothing to do with each other. In order to make something rotate you either need to use Transform.Rotate or add torque using physics.
@Eric5h5 Correct. Initializing the rotation to Quaternion.identity does not cause the CHANGE in rotation, this only sets the initial rotation (orientation) of the object. In the Space Shooter tutorial specifically, what causes the Asteroid to rotate is the code found in the RandomRotator script where the angular velocity of the object is set.
Follow this Question
Related Questions
OnTriggerEnter Not working in sample project 2 Answers
space shooter tutorial creating shots problem 2 Answers
Space Shooter - NullReferenceException on Scene Reload 0 Answers
Creating a spread shot using prefabs 0 Answers
Space Shooter Tutorial; Player won't move as shown at 7:05 in the Tutorial Video 3 Answers