Bone2D

Joint used with Skeleton2D to control and animate other nodes.

Use a hierarchy of Bone2D bound to a Skeleton2D to control, and animate other Node2D nodes. You can use Bone2D and Skeleton2D nodes to animate 2D meshes created with the Polygon 2D UV editor. Each bone has a rest transform that you can reset to with applyRest. These rest poses are relative to the bone's parent. If in the editor, you can set the rest pose of an entire skeleton using a menu option, from the code, you need to iterate over the bones to set their individual rest poses.

Members

Aliases

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

Functions

applyRest
void applyRest()

Stores the node's current transforms in rest.

getDefaultLength
double getDefaultLength()
getIndexInSkeleton
long getIndexInSkeleton()

Returns the node's index as part of the entire skeleton. See Skeleton2D.

getRest
Transform2D getRest()
getSkeletonRest
Transform2D getSkeletonRest()

Returns the node's rest Transform2D if it doesn't have a parent, or its rest pose relative to its parent.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(Bone2D other)
opEquals
bool opEquals(typeof(null) n)
setDefaultLength
void setDefaultLength(double default_length)
setRest
void setRest(Transform2D rest)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

defaultLength
double defaultLength [@property getter]
double defaultLength [@property setter]

Length of the bone's representation drawn in the editor's viewport in pixels.

rest
Transform2D rest [@property getter]
Transform2D rest [@property setter]

Rest transform of the bone. You can reset the node's transforms to this value using applyRest.

Static functions

_new
Bone2D _new()

Construct a new instance of Bone2D. Note: use memnew!Bone2D 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