Class BoneAttachment3D
- Namespace
- Godot
- Assembly
- GodotSharp.dll
This node selects a bone in a Skeleton3D and attaches to it. This means that the BoneAttachment3D node will either dynamically copy or override the 3D transform of the selected bone.
public class BoneAttachment3D : Node3D, IDisposable
- Inheritance
-
BoneAttachment3D
- Implements
- Inherited Members
Constructors
BoneAttachment3D()
public BoneAttachment3D()
Properties
BoneIdx
The index of the attached bone.
public int BoneIdx { get; set; }
Property Value
BoneName
The name of the attached bone.
public string BoneName { get; set; }
Property Value
OverridePose
Whether the BoneAttachment3D node will override the bone pose of the bone it is attached to. When set to true
, the BoneAttachment3D node can change the pose of the bone. When set to false
, the BoneAttachment3D will always be set to the bone's transform.
public bool OverridePose { get; set; }
Property Value
Methods
GetExternalSkeleton()
Returns the NodePath to the external Skeleton3D node, if one has been set.
public NodePath GetExternalSkeleton()
Returns
GetUseExternalSkeleton()
Returns whether the BoneAttachment3D node is using an external Skeleton3D rather than attempting to use its parent node as the Skeleton3D.
public bool GetUseExternalSkeleton()
Returns
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_nameName of the method to check for.
Returns
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_nameName of the signal to check for.
Returns
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_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
OnBonePoseUpdate(int)
A function that is called automatically when the Skeleton3D the BoneAttachment3D node is using has a bone that has changed its pose. This function is where the BoneAttachment3D node updates its position so it is correctly bound when it is not set to override the bone pose.
public void OnBonePoseUpdate(int boneIndex)
Parameters
boneIndex
int
SetExternalSkeleton(NodePath)
Sets the NodePath to the external skeleton that the BoneAttachment3D node should use. See SetUseExternalSkeleton(bool) to enable the external Skeleton3D node.
public void SetExternalSkeleton(NodePath externalSkeleton)
Parameters
externalSkeleton
NodePath
SetUseExternalSkeleton(bool)
Sets whether the BoneAttachment3D node will use an external Skeleton3D node rather than attempting to use its parent node as the Skeleton3D. When set to true
, the BoneAttachment3D node will use the external Skeleton3D node set in SetExternalSkeleton(NodePath).
public void SetUseExternalSkeleton(bool useExternalSkeleton)
Parameters
useExternalSkeleton
bool