SkeletonModification2DTwoBoneIK

package
v0.0.0-...-5fa07e4 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package SkeletonModification2DTwoBoneIK provides methods for working with SkeletonModification2DTwoBoneIK 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
	AsSkeletonModification2DTwoBoneIK() Instance
}

type Instance

This [SkeletonModification2D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosines and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three vertices of the triangle. Because the algorithm works by making a triangle, it can only operate on two bones. TwoBoneIK is great for arms, legs, and really any joints that can be represented by just two bones that bend to reach a target. This solver is more lightweight than [SkeletonModification2DFABRIK], but gives similar, natural looking results.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsObject

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

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) AsSkeletonModification2D

func (self Instance) AsSkeletonModification2D() SkeletonModification2D.Instance

func (Instance) AsSkeletonModification2DTwoBoneIK

func (self Instance) AsSkeletonModification2DTwoBoneIK() Instance

func (Instance) FlipBendDirection

func (self Instance) FlipBendDirection() bool

func (Instance) GetJointOneBone2dNode

func (self Instance) GetJointOneBone2dNode() string

Returns the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.

func (Instance) GetJointOneBoneIdx

func (self Instance) GetJointOneBoneIdx() int

Returns the index of the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.

func (Instance) GetJointTwoBone2dNode

func (self Instance) GetJointTwoBone2dNode() string

Returns the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.

func (Instance) GetJointTwoBoneIdx

func (self Instance) GetJointTwoBoneIdx() int

Returns the index of the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.

func (Instance) SetFlipBendDirection

func (self Instance) SetFlipBendDirection(value bool)

func (Instance) SetJointOneBone2dNode

func (self Instance) SetJointOneBone2dNode(bone2d_node string)

Sets the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.

func (Instance) SetJointOneBoneIdx

func (self Instance) SetJointOneBoneIdx(bone_idx int)

Sets the index of the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.

func (Instance) SetJointTwoBone2dNode

func (self Instance) SetJointTwoBone2dNode(bone2d_node string)

Sets the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.

func (Instance) SetJointTwoBoneIdx

func (self Instance) SetJointTwoBoneIdx(bone_idx int)

Sets the index of the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.

func (Instance) SetTargetMaximumDistance

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

func (Instance) SetTargetMinimumDistance

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

func (Instance) SetTargetNodepath

func (self Instance) SetTargetNodepath(value string)

func (Instance) TargetMaximumDistance

func (self Instance) TargetMaximumDistance() Float.X

func (Instance) TargetMinimumDistance

func (self Instance) TargetMinimumDistance() Float.X

func (Instance) TargetNodepath

func (self Instance) TargetNodepath() string

func (*Instance) UnsafePointer

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

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