Game Development Community

Typecast Quad16 to Quaternion

by Mogens Hvidtfeldt · in Torque X 2D · 09/22/2008 (2:04 am) · 0 replies

How can I typecast from Quad16 to Quaternion? Is there a helper function somewhere?

Would the following be correct?

Quat16 q16 = renderComponent.Shape.NodeRotations[0];
Quaternion q = Quaternion.Normalize(new Quaternion(q1.X, q1.Y, q1.Z, q1.W));