# A Crash Course in Understanding Quaternions

Learn how you can understand and implement quaternion rotations in your game projects
Free tutorial
Rating: 4.8 out of 5 (127 ratings)
4,860 students
1hr 29min of on-demand video
English
English [Auto]

A background overview of the mathematics that underpins quaternion rotations.
How gimbal lock occurs and why it is an issue with Euler angle rotation calculations.
Why quaternions provide a superior way of calculating rotations over Euler's formula.
How to use quaternions to rotate 3d objects in the Unity Game Engine with C#.

## Requirements

• Be able to explain why quaternions are better than Euler angles for calculating rotations.
• Be able to apply quaternion operations in Unity to orientate 3d objects.

## Description

Quaternions are like vegetables. You know they are good for you but you aren't sure why and if only you knew how to make them taste good. Okay so you aren't going to be eating quaternions, but you get the idea.  They are this really advanced topic in geometry and mathematics that anyone who designs or programs games has heard about, might have even used, but have no real understanding about what they are achieving and why they are better than other methods.

This short course will demystify the concept for you.  No, it won't give you the level of understanding of a postgraduate university mathematics major but it will provide you with the theory that will help you put quaternions and rotations in 3D space in context and give you the skills to use them with confidence in your game projects to overcome the limitations of other rotational methods.

Learn how to program and work with:

• 4x4 Matrices to represent Euler angles.

• Quaternion operations included in the Unity API.

• Rotational controls for Slerp, RotateTowards, and LookAt.

Contents and Overview

In this short course, you will gain an understanding of the history of rotational mathematics and how quaternions came into existence.  It begins by examining Euler angles and how they are used to orient objects in 3D while then proceeding to explain how Euler angle multiplication breaks down into the issue known as 'gimbal lock'.

Following this, a conceptual examination of basic rotational geometry is extrapolated from 2D space into the quaternion 4D.  It is then explained how 4 dimensions can be applied to 3D by implementing axis-angle rotations.

The second half of the course provides some hands-on tutorials for applying quaternions to move and rotate 3D objects in the Unity Game Engine using C#.

What students are saying about Penny's courses:

• Turns out, the hardest part of this course for me is finding the words to describe how glad I am to have enrolled in it.

• I honestly love Hollistic's teaching approach and I've never learned so much within a few hours about coding effectively with such detailed explanations!

• Penny is an excellent instructor and she does a great job of breaking down complex concepts into smaller, easy-to-understand topics.

## Who this course is for:

• Any game developer that wants to understand quaternions better.

## Instructors

International Award Winning Professor & Best Selling Author
• 4.6 Instructor Rating
• 21,722 Reviews
• 142,700 Students
• 30 Courses

Hi, I'm Dr Penny de Byl.  I'm a full stack developer of most things computer sciency and academic with a true passion for teaching.  I've been teaching others about games development, programming, computer graphics, animation and web design for over 25 years in universities in Australia and Europe at the full professor level. I've also consulted for Unity, SAE, the Australian Institute of Entertainment and Wikitude. My best selling textbooks including Holistic Game Development with Unity are used in over 100 institutions world-wide.  My graduates work at companies like Apple, Ubisoft, LinkedIn and Deloitte Digital.

I have an honours degree in computer graphics and a Ph.D. in artificial intelligence for games characters.  Over the course of my career I've won numerous awards for teaching excellence at the state, national and international levels including the Australian Learning and Teaching Council's Excellence in Teaching Award and the Unity Mobile Game Curriculum Competition. My approach to teaching computer science and related fields is project-based giving you hands-on workshops you can immediately get your teeth into.

I want you to leave my virtual classroom fully armed with a toolkit of skills for life-long learning.  I'm excited to now be focussing my efforts full-time on Udemy to bring my years of knowledge and experience to those eager to learn about technology.

Academic, Author & Game Development Enthusiast
• 4.6 Instructor Rating
• 21,722 Reviews
• 142,700 Students
• 30 Courses

Hi, I'm Dr Penny de Byl.  I'm a full stack developer of most things computer sciency and academic with a true passion for teaching.  I've been teaching others about games development, programming, computer graphics, animation and web design for over 25 years in universities in Australia and Europe at the full professor level. I've also consulted for Unity and SAE. My best selling textbooks including Holistic Game Development with Unity are used in over 100 institutions world-wide.  My graduates work at companies like Apple, Ubisoft, LinkedIn and Deloitte Digital.

I have an honours degree in computer graphics and a Ph.D. in artificial intelligence for games characters.  Over the course of my career I've won numerous awards for teaching excellence at the state, national and international levels including the Australian Learning and Teaching Council's Excellence in Teaching Award and the Unity Mobile Game Curriculum Competition. My approach to teaching computer science and related fields is project-based giving you hands-on workshops you can immediately get your teeth into.

I want you to leave my virtual classroom fully armed with a toolkit of skills for life-long learning.  I'm excited to now be focussing my efforts full-time on Udemy to bring my years of knowledge and experience to those eager to learn about technology.