AimModifier3D
The AimModifier3D rotates a bone to look at a reference bone.
The AimModifier3D rotates a bone to look at a reference bone.
This is a simple version of LookAtModifier3D that only allows bone to the reference without advanced options such as angle limitation or time-based interpolation.
The feature is simplified, but instead it is implemented with smooth tracking without euler, see AimModifier3D.SetUseEuler.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
AimModifier3DConstructor
public AimModifier3D();Properties1
SettingCountProperty
public int SettingCount { get; set; }The number of settings in the modifier.
Methods10
GetForwardAxisSkeletonModifier3D.BoneAxis
public SkeletonModifier3D.BoneAxis GetForwardAxis(int index);Returns the forward axis of the bone.
| Name | Type | Default |
|---|---|---|
index | int | — |
SkeletonModifier3D.BoneAxisGetPrimaryRotationAxisVector3.Axis
public Vector3.Axis GetPrimaryRotationAxis(int index);Returns the axis of the first rotation. It is enabled only if AimModifier3D.IsUsingEuler is true.
| Name | Type | Default |
|---|---|---|
index | int | — |
Vector3.AxisIsRelativebool
public bool IsRelative(int index);Returns true if the relative option is enabled in the setting at index.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolIsUsingEulerbool
public bool IsUsingEuler(int index);Returns true if it provides rotation with using euler.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolIsUsingSecondaryRotationbool
public bool IsUsingSecondaryRotation(int index);Returns true if it provides rotation by two axes. It is enabled only if AimModifier3D.IsUsingEuler is true.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolSetForwardAxisvoid
public void SetForwardAxis(int index, SkeletonModifier3D.BoneAxis axis);Sets the forward axis of the bone.
| Name | Type | Default |
|---|---|---|
index | int | — |
axis | SkeletonModifier3D.BoneAxis | — |
SetPrimaryRotationAxisvoid
public void SetPrimaryRotationAxis(int index, Vector3.Axis axis);Sets the axis of the first rotation. It is enabled only if AimModifier3D.IsUsingEuler is true.
| Name | Type | Default |
|---|---|---|
index | int | — |
axis | Vector3.Axis | — |
SetRelativevoid
public void SetRelative(int index, bool enabled);Sets relative option in the setting at index to enabled.
If sets enabled to true, the rotation is applied relative to the pose.
If sets enabled to false, the rotation is applied relative to the rest. It means to replace the current pose with the AimModifier3D's result.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetUseEulervoid
public void SetUseEuler(int index, bool enabled);If sets enabled to true, it provides rotation with using euler.
If sets enabled to false, it provides rotation with using rotation by arc generated from the forward axis vector and the vector toward the reference.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetUseSecondaryRotationvoid
public void SetUseSecondaryRotation(int index, bool enabled);If sets enabled to true, it provides rotation by two axes. It is enabled only if AimModifier3D.IsUsingEuler is true.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |