Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


RigidTransform

A rigid transformation type.
Read time 3 minutesLast updated 6 days ago

Definition

public struct RigidTransform

Fields

Value

Description

posThe translation part of the rigid transformation.
rotThe rotation part of the rigid transformation.

Static Fields

Value

Description

identityA RigidTransform representing the identity transform.

Constructors

Constructor

Description

RigidTransform(Unity.Mathematics.float3x3,Unity.Mathematics.float3)Constructs a RigidTransform from a rotation represented by a float3x3 matrix and a translation represented by a float3 vector.
RigidTransform(Unity.Mathematics.float4x4)Constructs a RigidTransform from a float4x4. Assumes the matrix is orthonormal.
RigidTransform(Unity.Mathematics.quaternion,Unity.Mathematics.float3)Constructs a RigidTransform from a rotation represented by a unit quaternion and a translation represented by a float3 vector.

Methods

Method

Description

EqualsReturns true if the RigidTransform is equal to a given RigidTransform, false otherwise.
GetHashCodeReturns a hash code for the RigidTransform.
ToStringReturns a string representation of the RigidTransform.

Static Methods

Method

Description

AxisAngleReturns a RigidTransform representing a rotation around a unit axis by an angle in radians. The rotation direction is clockwise when looking along the rotation axis towards the origin.
EulerReturns a RigidTransform constructed by first performing 3 rotations around the principal axes in a given order. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. When the rotation order is known at compile time, it is recommended for performance reasons to use specific Euler rotation constructors such as EulerZXY(...).
EulerXYZReturns a RigidTransform constructed by first performing a rotation around the x-axis, then the y-axis and finally the z-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.
EulerXZYReturns a RigidTransform constructed by first performing a rotation around the x-axis, then the z-axis and finally the y-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.
EulerYXZReturns a RigidTransform constructed by first performing a rotation around the y-axis, then the x-axis and finally the z-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.
EulerYZXReturns a RigidTransform constructed by first performing a rotation around the y-axis, then the z-axis and finally the x-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.
EulerZXYReturns a RigidTransform constructed by first performing a rotation around the z-axis, then the x-axis and finally the y-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. This is the default order rotation order in Unity.
EulerZYXReturns a RigidTransform constructed by first performing a rotation around the z-axis, then the y-axis and finally the x-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.
RotateXReturns a RigidTransform that rotates around the x-axis by a given number of radians.
RotateYReturns a RigidTransform that rotates around the y-axis by a given number of radians.
RotateZReturns a RigidTransform that rotates around the z-axis by a given number of radians.
TranslateReturns a RigidTransform that translates by an amount specified by a float3 vector.