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
- AudioListener3D
- AudioStreamPlayer3D
- BoneAttachment3D
- Camera3D (1)
- CollisionObject3D (2)
- CollisionPolygon3D
- CollisionShape3D
- GridMap
- ImporterMeshInstance3D
- Joint3D (5)
- LightmapProbe
- Marker3D
- NavigationLink3D
- NavigationObstacle3D
- NavigationRegion3D
- OpenXRCompositionLayer (3)
- OpenXRHand
- Path3D
- PathFollow3D
- RayCast3D
- RemoteTransform3D
- ShapeCast3D
- Skeleton3D
- SkeletonModifier3D (7)
- SpringArm3D
- SpringBoneCollision3D (3)
- VehicleWheel3D
- VisualInstance3D (13)
- XRFaceModifier3D
- XRNode3D (2)
- XROrigin3D
- LookAtModifier3D
- PhysicalBoneSimulator3D
- RetargetModifier3D
- SkeletonIK3D
- SpringBoneSimulator3D
- XRBodyModifier3D
- XRHandModifier3D
Table of contents
-
var interpolation: float -
var magnet: Vector3 = Vector3(0, 0, 0) -
var max_iterations: int = 10 -
var min_distance: float = 0.01 -
var override_tip_basis: bool = true -
var root_bone: StringName = &"" -
var target: Transform3D = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) -
var target_node: NodePath = NodePath("") -
var tip_bone: StringName = &"" -
var use_magnet: bool = false -
const func get_parent_skeleton() -> Skeleton3D -
func is_running() -> bool -
func start(one_time: bool = false) -> void -
func stop() -> void
SkeletonIK3D #
is_instantiable, Node3D, Node, core, not_builtin_classes
A node used to rotate all bones of a Skeleton3D bone chain a way that places the end bone at a desired 3D position.
SkeletonIK3D is used to rotate all bones of a Skeleton3D bone chain a way that places the end bone at a desired 3D position. A typical scenario for IK in games is to place a character's feet on the ground or a character's hands on a currently held object. SkeletonIK uses FabrikInverseKinematic internally to solve the bone chain and applies the results to the Skeleton3D bones_global_pose_override property for all affected bones in the chain. If fully applied, this overwrites any bone transform from Animations or bone custom poses set by users. The applied amount can be controlled with the SkeletonModifier3D.influence property.
# Apply IK effect automatically on every new frame (not the current)
skeleton_ik_node.start()
# Apply IK effect only on the current frame
skeleton_ik_node.start(true)
# Stop IK effect and reset bones_global_pose_override on Skeleton
skeleton_ik_node.stop()
# Apply full IK effect
skeleton_ik_node.set_influence(1.0)
# Apply half IK effect
skeleton_ik_node.set_influence(0.5)
# Apply zero IK effect (a value at or below 0.01 also removes bones_global_pose_override on Skeleton)
skeleton_ik_node.set_influence(0.0) Members #
var interpolation: float#
Interpolation value for how much the IK results are applied to the current skeleton bone chain. A value of 1.0 will overwrite all skeleton bone transforms completely while a value of 0.0 will visually disable the SkeletonIK.
var magnet: Vector3 = Vector3(0, 0, 0)#
Secondary target position (first is target property or target_node) for the IK chain. Use magnet position (pole target) to control the bending of the IK chain. Only works if the bone chain has more than 2 bones. The middle chain bone position will be linearly interpolated with the magnet position.
var max_iterations: int = 10#
Number of iteration loops used by the IK solver to produce more accurate (and elegant) bone chain results.
var min_distance: float = 0.01#
The minimum distance between bone and goal target. If the distance is below this value, the IK solver stops further iterations.
var override_tip_basis: bool = true#
If true overwrites the rotation of the tip bone with the rotation of the target (or target_node if defined).
var root_bone: StringName = &""#
The name of the current root bone, the first bone in the IK chain.
var target: Transform3D = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)#
First target of the IK chain where the tip bone is placed and, if override_tip_basis is true, how the tip bone is rotated. If a target_node path is available the nodes transform is used instead and this property is ignored.
var target_node: NodePath = NodePath("")#
Target node NodePath for the IK chain. If available, the node's current Transform3D is used instead of the target property.
var tip_bone: StringName = &""#
The name of the current tip bone, the last bone in the IK chain placed at the target transform (or target_node if defined).
var use_magnet: bool = false#
If true, instructs the IK solver to consider the secondary magnet target (pole target) when calculating the bone chain. Use the magnet position (pole target) to control the bending of the IK chain.
Methods #
const func get_parent_skeleton() -> Skeleton3D#
Returns the parent Skeleton3D node that was present when SkeletonIK entered the scene tree. Returns null if the parent node was not a Skeleton3D node when SkeletonIK3D entered the scene tree.
func is_running() -> bool#
Returns true if SkeletonIK is applying IK effects on continues frames to the Skeleton3D bones. Returns false if SkeletonIK is stopped or start was used with the one_time parameter set to true.
func start(one_time: bool = false) -> void#
Starts applying IK effects on each frame to the Skeleton3D bones but will only take effect starting on the next frame. If one_time is true, this will take effect immediately but also reset on the next frame.
func stop() -> void#
Stops applying IK effects on each frame to the Skeleton3D bones and also calls Skeleton3D.clear_bones_global_pose_override to remove existing overrides on all bones.