Documentation

Unity Engine

Download Unity

Unity Engine

GetSocketLocalToCharacterTRS(int, out float3, out quaternion, out float3)

Returns the translation, rotation and scale of the socket in character space.
Read time 1 minuteLast updated 4 hours ago

Definition

GetSocketLocalToCharacterTRS(int, float3, quaternion, float3)

public readonly void GetSocketLocalToCharacterTRS(int index, out float3 translation, out quaternion rotation, out float3 scale)

Parameters

index

The index of the socket in the rig's socket list.

translation

The socket's translation in character space.

rotation

The socket's rotation in character space.

scale

The socket's scale in character space.

Remarks

A socket is a fixed local transform that the rig stores relative to a bone. This method applies that transform to the character space transform of the parent bone of the socket.
If the parent bone of the socket or a bone above it has a non-uniform scale, the rotation and scale in character space are approximations. The translation is exact. The combined transform shears, and a rotation with a scale can't represent a shear. To get the exact transform, use AnimationStream.GetSocketLocalToCharacterMatrix.