Documentation

Unity Engine

Download Unity

Unity Engine

GetSocketLocalToCharacterRotation(int)

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

Definition

public readonly quaternion GetSocketLocalToCharacterRotation(int index)

Parameters

index

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

Returns

Type

Description

quaternionThe socket's rotation 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.
When the parent bone of the socket, or a bone above it, has a non-uniform scale, the rotation in character space is an approximation. The combined transform shears, and a rotation can't represent a shear. To get the exact transform, use AnimationStream.GetSocketLocalToCharacterMatrix.