Documentation ¶
Overview ¶
Package SkeletonIK3D provides methods for working with SkeletonIK3D object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode3D() Node3D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsSkeletonIK3D() Instance
- func (self Instance) AsSkeletonModifier3D() SkeletonModifier3D.Instance
- func (self Instance) GetParentSkeleton() [1]gdclass.Skeleton3D
- func (self Instance) Interpolation() Float.X
- func (self Instance) IsRunning() bool
- func (self Instance) Magnet() Vector3.XYZ
- func (self Instance) MaxIterations() int
- func (self Instance) MinDistance() Float.X
- func (self Instance) OverrideTipBasis() bool
- func (self Instance) RootBone() string
- func (self Instance) SetInterpolation(value Float.X)
- func (self Instance) SetMagnet(value Vector3.XYZ)
- func (self Instance) SetMaxIterations(value int)
- func (self Instance) SetMinDistance(value Float.X)
- func (self Instance) SetOverrideTipBasis(value bool)
- func (self Instance) SetRootBone(value string)
- func (self Instance) SetTarget(value Transform3D.BasisOrigin)
- func (self Instance) SetTargetNode(value string)
- func (self Instance) SetTipBone(value string)
- func (self Instance) SetUseMagnet(value bool)
- func (self Instance) Start()
- func (self Instance) Stop()
- func (self Instance) Target() Transform3D.BasisOrigin
- func (self Instance) TargetNode() string
- func (self Instance) TipBone() string
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) UseMagnet() bool
- 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.SkeletonIK3D
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] [code]bones_global_pose_override[/code] property for all affected bones in the chain. If fully applied, this overwrites any bone transform from [Animation]s or bone custom poses set by users. The applied amount can be controlled with the [member SkeletonModifier3D.influence] property. [codeblock] # 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) [/codeblock]
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsSkeletonIK3D ¶
func (Instance) AsSkeletonModifier3D ¶
func (self Instance) AsSkeletonModifier3D() SkeletonModifier3D.Instance
func (Instance) GetParentSkeleton ¶
func (self Instance) GetParentSkeleton() [1]gdclass.Skeleton3D
Returns the parent [Skeleton3D] Node that was present when SkeletonIK entered the [SceneTree]. Returns null if the parent node was not a [Skeleton3D] Node when SkeletonIK3D entered the [SceneTree].
func (Instance) Interpolation ¶
func (Instance) IsRunning ¶
Returns [code]true[/code] if SkeletonIK is applying IK effects on continues frames to the [Skeleton3D] bones. Returns [code]false[/code] if SkeletonIK is stopped or [method start] was used with the [code]one_time[/code] parameter set to [code]true[/code].
func (Instance) MaxIterations ¶
func (Instance) MinDistance ¶
func (Instance) OverrideTipBasis ¶
func (Instance) SetInterpolation ¶
func (Instance) SetMaxIterations ¶
func (Instance) SetMinDistance ¶
func (Instance) SetOverrideTipBasis ¶
func (Instance) SetRootBone ¶
func (Instance) SetTarget ¶
func (self Instance) SetTarget(value Transform3D.BasisOrigin)
func (Instance) SetTargetNode ¶
func (Instance) SetTipBone ¶
func (Instance) SetUseMagnet ¶
func (Instance) Start ¶
func (self Instance) Start()
Starts applying IK effects on each frame to the [Skeleton3D] bones but will only take effect starting on the next frame. If [param one_time] is [code]true[/code], this will take effect immediately but also reset on the next frame.
func (Instance) Stop ¶
func (self Instance) Stop()
Stops applying IK effects on each frame to the [Skeleton3D] bones and also calls [method Skeleton3D.clear_bones_global_pose_override] to remove existing overrides on all bones.
func (Instance) Target ¶
func (self Instance) Target() Transform3D.BasisOrigin