SkeletonModificationStack2D

package
v0.0.0-...-357ca8a Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

This resource is used by the Skeleton and holds a stack of SkeletonModification2Ds.

This controls the order of the modifications and how they are applied. Modification order is especially important for full-body IK setups, as you need to execute the modifications in the correct order to get the desired results. For example, you want to execute a modification on the spine before the arms on a humanoid skeleton.

This resource also controls how strongly all of the modifications are applied to the Skeleton2D.

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
	AsSkeletonModificationStack2D() Instance
}

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

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]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

func (*Extension[T]) AsResource

func (self *Extension[T]) AsResource() Resource.Instance

func (*Extension[T]) AsSkeletonModificationStack2D

func (self *Extension[T]) AsSkeletonModificationStack2D() Instance

type ID

type ID Object.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.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

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

func (self Instance) AsSkeletonModificationStack2D() Instance

func (Instance) DeleteModification

func (self Instance) DeleteModification(mod_idx int)

Deletes the SkeletonModification2D at the index position 'mod_idx', if it exists.

func (Instance) EnableAllModifications

func (self Instance) EnableAllModifications(enabled bool)

Enables all SkeletonModification2Ds in the stack.

func (Instance) Enabled

func (self Instance) Enabled() bool

If true, the modification's in the stack will be called. This is handled automatically through the Skeleton2D node.

func (Instance) Execute

func (self Instance) Execute(delta Float.X, execution_mode int)

Executes all of the SkeletonModification2Ds in the stack that use the same execution mode as the passed-in 'execution_mode', starting from index 0 to ModificationCount.

Note: The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results.

func (Instance) GetIsSetup

func (self Instance) GetIsSetup() bool

Returns a boolean that indicates whether the modification stack is setup and can execute.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) ModificationCount

func (self Instance) ModificationCount() int

The number of modifications in the stack.

func (Instance) SetEnabled

func (self Instance) SetEnabled(value bool)

SetEnabled sets the property returned by [GetEnabled].

func (Instance) SetModificationCount

func (self Instance) SetModificationCount(value int)

SetModificationCount sets the property returned by [GetModificationCount].

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetStrength

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

SetStrength sets the property returned by [GetStrength].

func (Instance) Setup

func (self Instance) Setup()

Sets up the modification stack so it can execute. This function should be called by Skeleton2D and shouldn't be manually called unless you know what you are doing.

func (Instance) Strength

func (self Instance) Strength() Float.X

The interpolation strength of the modifications in stack. A value of 0 will make it where the modifications are not applied, a strength of 0.5 will be half applied, and a strength of 1 will allow the modifications to be fully applied and override the Skeleton2D Bone2D poses.

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