SkeletonIK3D

package
v0.0.0-...-ae8aae0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package SkeletonIK3D provides methods for working with SkeletonIK3D object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsSkeletonIK3D() Instance
}

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 New

func New() Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode3D

func (self Instance) AsNode3D() Node3D.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsSkeletonIK3D

func (self Instance) AsSkeletonIK3D() Instance

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 (self Instance) Interpolation() Float.X

func (Instance) IsRunning

func (self Instance) IsRunning() bool

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) Magnet

func (self Instance) Magnet() Vector3.XYZ

func (Instance) MaxIterations

func (self Instance) MaxIterations() int

func (Instance) MinDistance

func (self Instance) MinDistance() Float.X

func (Instance) OverrideTipBasis

func (self Instance) OverrideTipBasis() bool

func (Instance) RootBone

func (self Instance) RootBone() string

func (Instance) SetInterpolation

func (self Instance) SetInterpolation(value Float.X)

func (Instance) SetMagnet

func (self Instance) SetMagnet(value Vector3.XYZ)

func (Instance) SetMaxIterations

func (self Instance) SetMaxIterations(value int)

func (Instance) SetMinDistance

func (self Instance) SetMinDistance(value Float.X)

func (Instance) SetOverrideTipBasis

func (self Instance) SetOverrideTipBasis(value bool)

func (Instance) SetRootBone

func (self Instance) SetRootBone(value string)

func (Instance) SetTarget

func (self Instance) SetTarget(value Transform3D.BasisOrigin)

func (Instance) SetTargetNode

func (self Instance) SetTargetNode(value string)

func (Instance) SetTipBone

func (self Instance) SetTipBone(value string)

func (Instance) SetUseMagnet

func (self Instance) SetUseMagnet(value bool)

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

func (Instance) TargetNode

func (self Instance) TargetNode() string

func (Instance) TipBone

func (self Instance) TipBone() string

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) UseMagnet

func (self Instance) UseMagnet() bool

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL