Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

quaternion Constructor

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public quaternion(float x, float y, float z, float w);

Parameters

Parameter Description
x The quaternion x component.
y The quaternion y component.
z The quaternion z component.
w The quaternion w component.

Description

Constructs a quaternion from four float values.


Declaration

public quaternion(float4 value);

Parameters

Parameter Description
value The quaternion xyzw component values.

Description

Constructs a quaternion from float4 vector.


Declaration

public quaternion(float3x3 m);

Parameters

Parameter Description
m The float3x3 orthonormal rotation matrix.

Description

Constructs a unit quaternion from a float3x3 rotation matrix. The matrix must be orthonormal.


Declaration

public quaternion(float4x4 m);

Parameters

Parameter Description
m The float4x4 orthonormal rotation matrix.

Description

Constructs a unit quaternion from an orthonormal float4x4 matrix.