What is w cordinate in quaternion?

What is w cordinate in quaternion? How it affect rotation and how to calculate this cordinate?

A quaternion describes a rotation using four complex numbers. You almost never manipulate the numbers individually and they don’t really make any sense on their own.

Here’s an often referred GDC presentation that presents the concept:

If you need to create a quaternion there’s several functions in vmath that will help you.

2 Likes

In the case of quaternions, I think it stands for “wizardry”.

4 Likes

The name starts with a “Q” so I’m going with “quantum mechanics”. So basically what you just said.

1 Like

As @brtizl mentions, these numbers should rarely be used directly.

However, for a 3D rotation, the xyz is the axis (not normalized!), and the w is the (encoded) angle.

3 Likes

I stumbled upon this old post by change. A (unit) quaternion describes a rotation in space using four REAL numbers; and not four complex numbers.