Documentation ¶
Overview ¶
Package Skeleton2D provides methods for working with Skeleton2D object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode2D() Node2D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsSkeleton2D() Instance
- func (self Instance) ExecuteModifications(delta Float.X, execution_mode int)
- func (self Instance) GetBone(idx int) [1]gdclass.Bone2D
- func (self Instance) GetBoneCount() int
- func (self Instance) GetBoneLocalPoseOverride(bone_idx int) Transform2D.OriginXY
- func (self Instance) GetModificationStack() [1]gdclass.SkeletonModificationStack2D
- func (self Instance) GetSkeleton() RID.Skeleton
- func (self Instance) OnBoneSetupChanged(cb func())
- func (self Instance) SetBoneLocalPoseOverride(bone_idx int, override_pose Transform2D.OriginXY, strength Float.X, ...)
- func (self Instance) SetModificationStack(modification_stack [1]gdclass.SkeletonModificationStack2D)
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
type Instance [1]gdclass.Skeleton2D
[Skeleton2D] parents a hierarchy of [Bone2D] nodes. It holds a reference to each [Bone2D]'s rest pose and acts as a single point of access to its bones. To set up different types of inverse kinematics for the given Skeleton2D, a [SkeletonModificationStack2D] should be created. The inverse kinematics be applied by increasing [member SkeletonModificationStack2D.modification_count] and creating the desired number of modifications.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) AsSkeleton2D ¶
func (Instance) ExecuteModifications ¶
Executes all the modifications on the [SkeletonModificationStack2D], if the Skeleton2D has one assigned.
func (Instance) GetBone ¶
Returns a [Bone2D] from the node hierarchy parented by Skeleton2D. The object to return is identified by the parameter [param idx]. Bones are indexed by descending the node hierarchy from top to bottom, adding the children of each branch before moving to the next sibling.
func (Instance) GetBoneCount ¶
Returns the number of [Bone2D] nodes in the node hierarchy parented by Skeleton2D.
func (Instance) GetBoneLocalPoseOverride ¶
func (self Instance) GetBoneLocalPoseOverride(bone_idx int) Transform2D.OriginXY
Returns the local pose override transform for [param bone_idx].
func (Instance) GetModificationStack ¶
func (self Instance) GetModificationStack() [1]gdclass.SkeletonModificationStack2D
Returns the [SkeletonModificationStack2D] attached to this skeleton, if one exists.
func (Instance) GetSkeleton ¶
Returns the [RID] of a Skeleton2D instance.
func (Instance) OnBoneSetupChanged ¶
func (self Instance) OnBoneSetupChanged(cb func())
func (Instance) SetBoneLocalPoseOverride ¶
func (self Instance) SetBoneLocalPoseOverride(bone_idx int, override_pose Transform2D.OriginXY, strength Float.X, persistent bool)
Sets the local pose transform, [param override_pose], for the bone at [param bone_idx]. [param strength] is the interpolation strength that will be used when applying the pose, and [param persistent] determines if the applied pose will remain. [b]Note:[/b] The pose transform needs to be a local transform relative to the [Bone2D] node at [param bone_idx]!
func (Instance) SetModificationStack ¶
func (self Instance) SetModificationStack(modification_stack [1]gdclass.SkeletonModificationStack2D)
Sets the [SkeletonModificationStack2D] attached to this skeleton.