Inheritance #
- AudioServer
- CameraServer
- ClassDB
- DisplayServer
- EditorFileSystemDirectory
- EditorInterface
- EditorPaths
- EditorSelection
- EditorUndoRedoManager
- EditorVCSInterface
- Engine
- EngineDebugger
- FramebufferCacheRD
- GDExtensionManager
- Geometry2D
- Geometry3D
- IP
- Input
- InputMap
- JNISingleton
- JSONRPC
- JavaClassWrapper
- JavaScriptBridge
- MainLoop (1)
- Marshalls
- MovieWriter
- NativeMenu
- NavigationMeshGenerator
- NavigationServer2D
- NavigationServer3D
- Node (21)
- OS
- OpenXRExtensionWrapperExtension
- OpenXRInteractionProfileMetadata
- Performance
- PhysicsDirectBodyState2D (1)
- PhysicsDirectBodyState3D (1)
- PhysicsDirectSpaceState2D (1)
- PhysicsDirectSpaceState3D (1)
- PhysicsServer2D (1)
- PhysicsServer2DManager
- PhysicsServer3D (1)
- PhysicsServer3DManager
- PhysicsServer3DRendering
ServerHandler
- ProjectSettings
- RefCounted (121)
- RenderData (2)
- RenderSceneData (2)
- RenderingDevice
- RenderingServer
- ResourceLoader
- ResourceSaver
- ResourceUID
- ScriptLanguage (1)
- ShaderIncludeDB
- TextServerManager
- ThemeDB
- TileData
- Time
- TranslationServer
- TreeItem
- UndoRedo
- UniformSetCacheRD
- WorkerThreadPool
- XRServer
- XRVRS
- AnimationMixer (2)
- AudioStreamPlayer
- CanvasItem (2)
- CanvasLayer (1)
- EditorFileSystem
- EditorPlugin (1)
- EditorResourcePreview
- HTTPRequest
- InstancePlaceholder
- MissingNode
- MultiplayerSpawner
- MultiplayerSynchronizer
- NavigationAgent2D
- NavigationAgent3D
- Node3D (31)
- ResourcePreloader
- ShaderGlobalsOverride
- StatusIndicator
- Timer
- Viewport (2)
- WorldEnvironment
- AnimatedSprite2D
- AudioListener2D
- AudioStreamPlayer2D
- BackBufferCopy
- Bone2D
- CPUParticles2D
- Camera2D
- CanvasGroup
- CanvasModulate
- CollisionObject2D (2)
- CollisionPolygon2D
- CollisionShape2D
- GPUParticles2D
- Joint2D (3)
- Light2D (2)
- LightOccluder2D
- Line2D
- Marker2D
- MeshInstance2D
- MultiMeshInstance2D
- NavigationLink2D
- NavigationObstacle2D
- NavigationRegion2D
- Parallax2D
- ParallaxLayer
- Path2D
- PathFollow2D
- Polygon2D
- RayCast2D
- RemoteTransform2D
- ShapeCast2D
- Skeleton2D
- Sprite2D
- TileMap
- TileMapLayer
- TouchScreenButton
- VisibleOnScreenNotifier2D (1)
Table of contents
-
func execute_modifications(execution_mode: int) -> void -
func get_bone(idx: int) -> Bone2D -
const func get_bone_count() -> int -
func get_bone_local_pose_override(bone_idx: int) -> Transform2D -
const func get_modification_stack() -> SkeletonModificationStack2D -
const func get_skeleton() -> RID -
func set_bone_local_pose_override(persistent: bool) -> void -
func set_modification_stack(modification_stack: SkeletonModificationStack2D) -> void -
signal bone_setup_changed()
Skeleton2D #
is_instantiable, Node2D, Node, core, not_builtin_classes
The parent of a hierarchy of Bone2Ds, used to create a 2D skeletal animation.
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 SkeletonModificationStack2D.modification_count and creating the desired number of modifications.
Members #
Methods #
func execute_modifications(execution_mode: int) -> void#
Executes all the modifications on the SkeletonModificationStack2D, if the Skeleton2D has one assigned.
func get_bone(idx: int) -> Bone2D#
Returns a Bone2D from the node hierarchy parented by Skeleton2D. The object to return is identified by the parameter 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.
const func get_bone_count() -> int#
Returns the number of Bone2D nodes in the node hierarchy parented by Skeleton2D.
func get_bone_local_pose_override(bone_idx: int) -> Transform2D#
Returns the local pose override transform for bone_idx.
const func get_modification_stack() -> SkeletonModificationStack2D#
Returns the SkeletonModificationStack2D attached to this skeleton, if one exists.
func set_bone_local_pose_override(persistent: bool) -> void#
Sets the local pose transform, override_pose, for the bone at bone_idx.
strength is the interpolation strength that will be used when applying the pose, and persistent determines if the applied pose will remain.
Note: The pose transform needs to be a local transform relative to the Bone2D node at bone_idx!
func set_modification_stack(modification_stack: SkeletonModificationStack2D) -> void#
Sets the SkeletonModificationStack2D attached to this skeleton.
Annotations #
Constants #
Constructors #
Enums #
Operators #
Signals #
signal bone_setup_changed()#
Emitted when the Bone2D setup attached to this skeletons changes. This is primarily used internally within the skeleton.