Documentation
¶
Overview ¶
This graphics.gd/classdb/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 graphics.gd/classdb/SkeletonModification2DFABRIK, but gives similar, natural looking results.
Index ¶
- type Advanced
- type Any
- type Extension
- func (self *Extension[T]) AsObject() [1]gd.Object
- func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
- func (self *Extension[T]) AsResource() Resource.Instance
- func (self *Extension[T]) AsSkeletonModification2D() SkeletonModification2D.Instance
- func (self *Extension[T]) AsSkeletonModification2DTwoBoneIK() Instance
- type ID
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) AsSkeletonModification2D() SkeletonModification2D.Instance
- func (self Instance) AsSkeletonModification2DTwoBoneIK() Instance
- func (self Instance) FlipBendDirection() bool
- func (self Instance) GetJointOneBone2dNode() string
- func (self Instance) GetJointOneBoneIdx() int
- func (self Instance) GetJointTwoBone2dNode() string
- func (self Instance) GetJointTwoBoneIdx() int
- func (self Instance) ID() ID
- func (self Instance) SetFlipBendDirection(value bool)
- func (self Instance) SetJointOneBone2dNode(bone2d_node string)
- func (self Instance) SetJointOneBoneIdx(bone_idx int)
- func (self Instance) SetJointTwoBone2dNode(bone2d_node string)
- func (self Instance) SetJointTwoBoneIdx(bone_idx int)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetTargetMaximumDistance(value Float.X)
- func (self Instance) SetTargetMinimumDistance(value Float.X)
- func (self Instance) SetTargetNodepath(value string)
- func (self Instance) TargetMaximumDistance() Float.X
- func (self Instance) TargetMinimumDistance() Float.X
- func (self Instance) TargetNodepath() string
- 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 Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
func (*Extension[T]) AsSkeletonModification2D ¶
func (self *Extension[T]) AsSkeletonModification2D() SkeletonModification2D.Instance
func (*Extension[T]) AsSkeletonModification2DTwoBoneIK ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.SkeletonModification2DTwoBoneIK
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) AsSkeletonModification2D ¶
func (self Instance) AsSkeletonModification2D() SkeletonModification2D.Instance
func (Instance) AsSkeletonModification2DTwoBoneIK ¶
func (Instance) FlipBendDirection ¶
func (Instance) GetJointOneBone2dNode ¶
Returns the graphics.gd/classdb/Bone2D node that is being used as the first bone in the TwoBoneIK modification.
func (Instance) GetJointOneBoneIdx ¶
Returns the index of the graphics.gd/classdb/Bone2D node that is being used as the first bone in the TwoBoneIK modification.
func (Instance) GetJointTwoBone2dNode ¶
Returns the graphics.gd/classdb/Bone2D node that is being used as the second bone in the TwoBoneIK modification.
func (Instance) GetJointTwoBoneIdx ¶
Returns the index of the graphics.gd/classdb/Bone2D node that is being used as the second bone in the TwoBoneIK modification.
func (Instance) SetFlipBendDirection ¶
func (Instance) SetJointOneBone2dNode ¶
Sets the graphics.gd/classdb/Bone2D node that is being used as the first bone in the TwoBoneIK modification.
func (Instance) SetJointOneBoneIdx ¶
Sets the index of the graphics.gd/classdb/Bone2D node that is being used as the first bone in the TwoBoneIK modification.
func (Instance) SetJointTwoBone2dNode ¶
Sets the graphics.gd/classdb/Bone2D node that is being used as the second bone in the TwoBoneIK modification.
func (Instance) SetJointTwoBoneIdx ¶
Sets the index of the graphics.gd/classdb/Bone2D node that is being used as the second bone in the TwoBoneIK modification.