Table of Contents

Class RetargetModifier3D

Namespace
Godot
Assembly
GodotSharp.dll

Retrieves the pose (or global pose) relative to the parent Skeleton's rest in model space and transfers it to the child Skeleton.

This modifier rewrites the pose of the child skeleton directly in the parent skeleton's update process. This means that it overwrites the mapped bone pose set in the normal process on the target skeleton. If you want to set the target skeleton bone pose after retargeting, you will need to add a SkeletonModifier3D child to the target skeleton and thereby modify the pose.

Note: When the UseGlobalPose is enabled, even if it is an unmapped bone, it can cause visual problems because the global pose is applied ignoring the parent bone's pose if it has mapped bone children. See also UseGlobalPose.

public class RetargetModifier3D : SkeletonModifier3D, IDisposable
Inheritance
RetargetModifier3D
Implements
Inherited Members

Constructors

RetargetModifier3D()

public RetargetModifier3D()

Properties

Enable

Flags to control the process of the transform elements individually when UseGlobalPose is disabled.

public RetargetModifier3D.TransformFlag Enable { get; set; }

Property Value

RetargetModifier3D.TransformFlag

Profile

SkeletonProfile for retargeting bones with names matching the bone list.

public SkeletonProfile Profile { get; set; }

Property Value

SkeletonProfile

UseGlobalPose

If false, in case the target skeleton has fewer bones than the source skeleton, the source bone parent's transform will be ignored.

Instead, it is possible to retarget between models with different body shapes, and position, rotation, and scale can be retargeted separately.

If true, retargeting is performed taking into account global pose.

In case the target skeleton has fewer bones than the source skeleton, the source bone parent's transform is taken into account. However, bone length between skeletons must match exactly, if not, the bones will be forced to expand or shrink.

This is useful for using dummy bone with length 0 to match postures when retargeting between models with different number of bones.

public bool UseGlobalPose { get; set; }

Property Value

bool

Methods

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool

IsPositionEnabled()

Returns true if Enable has Position.

public bool IsPositionEnabled()

Returns

bool

IsRotationEnabled()

Returns true if Enable has Rotation.

public bool IsRotationEnabled()

Returns

bool

IsScaleEnabled()

Returns true if Enable has Scale.

public bool IsScaleEnabled()

Returns

bool

SetPositionEnabled(bool)

Sets Position into Enable.

public void SetPositionEnabled(bool enabled)

Parameters

enabled bool

SetRotationEnabled(bool)

Sets Rotation into Enable.

public void SetRotationEnabled(bool enabled)

Parameters

enabled bool

SetScaleEnabled(bool)

Sets Scale into Enable.

public void SetScaleEnabled(bool enabled)

Parameters

enabled bool