From the course: Cert Prep: Unity Certified Associate Game Developer Scripting with C#

Unlock the full course today

Join today to access over 23,400 courses taught by industry experts.

Quaternions

Quaternions

- [Illustrator] In the previous movie, we created this buggy object here with a movie script attached that will move the object forwards in the direction that it's looking. In this video, we're going to move away from movement and look at how we can make an object rotate. Now, I want to do that in isolation from the movement script. So I'm going to select the movie script that we already have and simply deactivate it, so that the update function won't run, and it won't continue to move the object. And that way we can just focus on rotation. Now, to make an object move, we're going to be rotating it around its center. When I select the buggy object here from the hierarchy panel, we have our gizmo and we can rotate an object around three main axes. You can see here in the rotation field this vehicle already has some rotation around the y-axis. If I click and drag on Y, you can see that the y-axis effectively is an…

Contents