Documentation

Unity Engine

Download Unity

Unity Engine

GetSocketLocalToCharacterScale(int)

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

Definition

public readonly float3 GetSocketLocalToCharacterScale(int index)

Parameters

index

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

Returns

Type

Description

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