Skeleton

Skeleton for characters and animated objects.

Skeleton provides a hierarchical interface for managing bones, including pose, rest and animation (see Animation). It can also use ragdoll physics. The overall transform of a bone with respect to the skeleton is determined by the following hierarchical order: rest pose, custom pose and pose. Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it not the actual global/world transform of the bone.

@GodotBaseClass
struct Skeleton {}

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

Constants
enum Constants

Functions

addBone
void addBone(String name)

Adds a bone, with name name. getBoneCount will become the bone index.

bindChildNodeToBone
void bindChildNodeToBone(long bone_idx, Node node)

Deprecated soon.

clearBones
void clearBones()

Clear all the bones in this skeleton.

clearBonesGlobalPoseOverride
void clearBonesGlobalPoseOverride()
findBone
long findBone(String name)

Returns the bone index that matches name as its name.

getBoneCount
long getBoneCount()

Returns the amount of bones in the skeleton.

getBoneCustomPose
Transform getBoneCustomPose(long bone_idx)

Returns the custom pose of the specified bone. Custom pose is applied on top of the rest pose.

getBoneGlobalPose
Transform getBoneGlobalPose(long bone_idx)

Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual "global" transform of the bone.

getBoneGlobalPoseNoOverride
Transform getBoneGlobalPoseNoOverride(long bone_idx)

Returns the overall transform of the specified bone, with respect to the skeleton, but without any global pose overrides. Being relative to the skeleton frame, this is not the actual "global" transform of the bone.

getBoneName
String getBoneName(long bone_idx)

Returns the name of the bone at index index.

getBoneParent
long getBoneParent(long bone_idx)

Returns the bone index which is the parent of the bone at bone_idx. If -1, then bone has no parent. Note: The parent bone returned will always be less than bone_idx.

getBonePose
Transform getBonePose(long bone_idx)

Returns the pose transform of the specified bone. Pose is applied on top of the custom pose, which is applied on top the rest pose.

getBoneRest
Transform getBoneRest(long bone_idx)

Returns the rest transform for a bone bone_idx.

getBoundChildNodesToBone
Array getBoundChildNodesToBone(long bone_idx)

Deprecated soon.

isBoneRestDisabled
bool isBoneRestDisabled(long bone_idx)
localizeRests
void localizeRests()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(Skeleton other)
opEquals
bool opEquals(typeof(null) n)
physicalBonesAddCollisionException
void physicalBonesAddCollisionException(RID exception)
physicalBonesRemoveCollisionException
void physicalBonesRemoveCollisionException(RID exception)
physicalBonesStartSimulation
void physicalBonesStartSimulation(Array bones)
physicalBonesStopSimulation
void physicalBonesStopSimulation()
registerSkin
Ref!SkinReference registerSkin(Skin skin)
setBoneCustomPose
void setBoneCustomPose(long bone_idx, Transform custom_pose)
setBoneDisableRest
void setBoneDisableRest(long bone_idx, bool disable)
setBoneGlobalPoseOverride
void setBoneGlobalPoseOverride(long bone_idx, Transform pose, double amount, bool persistent)
setBoneParent
void setBoneParent(long bone_idx, long parent_idx)

Sets the bone index parent_idx as the parent of the bone at bone_idx. If -1, then bone has no parent. Note: parent_idx must be less than bone_idx.

setBonePose
void setBonePose(long bone_idx, Transform pose)

Sets the pose transform for bone bone_idx.

setBoneRest
void setBoneRest(long bone_idx, Transform rest)

Sets the rest transform for bone bone_idx.

toHash
size_t toHash()
unbindChildNodeFromBone
void unbindChildNodeFromBone(long bone_idx, Node node)

Deprecated soon.

unparentBoneAndRest
void unparentBoneAndRest(long bone_idx)

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
Skeleton _new()

Construct a new instance of Skeleton. Note: use memnew!Skeleton instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta