SkeletonModification2DJiggle

package
v0.0.0-...-7325ca5 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

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

type Instance

This modification moves a series of bones, typically called a bone chain, towards a target. What makes this modification special is that it calculates the velocity and acceleration for each bone in the bone chain, and runs a very light physics-like calculation using the inputted values. This allows the bones to overshoot the target and "jiggle" around. It can be configured to act more like a spring, or sway around like cloth might. This modification is useful for adding additional motion to things like hair, the edges of clothing, and more. It has several settings to that allow control over how the joint moves when the target moves. [b]Note:[/b] The Jiggle modifier has [code]jiggle_joints[/code], which are the data objects that hold the data for each joint in the Jiggle chain. This is different from than [Bone2D] nodes! Jiggle joints hold the data needed for each [Bone2D] in the bone chain used by the Jiggle modification.

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

func (self Instance) AsSkeletonModification2DJiggle() Instance

func (Instance) Damping

func (self Instance) Damping() Float.X

func (Instance) GetCollisionMask

func (self Instance) GetCollisionMask() int

Returns the collision mask used by the Jiggle modifier when collisions are enabled.

func (Instance) GetJiggleJointBone2dNode

func (self Instance) GetJiggleJointBone2dNode(joint_idx int) string

Returns the [Bone2D] node assigned to the Jiggle joint at [param joint_idx].

func (Instance) GetJiggleJointBoneIndex

func (self Instance) GetJiggleJointBoneIndex(joint_idx int) int

Returns the index of the [Bone2D] node assigned to the Jiggle joint at [param joint_idx].

func (Instance) GetJiggleJointDamping

func (self Instance) GetJiggleJointDamping(joint_idx int) Float.X

Returns the amount of damping of the Jiggle joint at [param joint_idx].

func (Instance) GetJiggleJointGravity

func (self Instance) GetJiggleJointGravity(joint_idx int) Vector2.XY

Returns a [Vector2] representing the amount of gravity the Jiggle joint at [param joint_idx] is influenced by.

func (Instance) GetJiggleJointMass

func (self Instance) GetJiggleJointMass(joint_idx int) Float.X

Returns the amount of mass of the jiggle joint at [param joint_idx].

func (Instance) GetJiggleJointOverride

func (self Instance) GetJiggleJointOverride(joint_idx int) bool

Returns a boolean that indicates whether the joint at [param joint_idx] is overriding the default Jiggle joint data defined in the modification.

func (Instance) GetJiggleJointStiffness

func (self Instance) GetJiggleJointStiffness(joint_idx int) Float.X

Returns the stiffness of the Jiggle joint at [param joint_idx].

func (Instance) GetJiggleJointUseGravity

func (self Instance) GetJiggleJointUseGravity(joint_idx int) bool

Returns a boolean that indicates whether the joint at [param joint_idx] is using gravity or not.

func (Instance) GetUseColliders

func (self Instance) GetUseColliders() bool

Returns whether the jiggle modifier is taking physics colliders into account when solving.

func (Instance) Gravity

func (self Instance) Gravity() Vector2.XY

func (Instance) JiggleDataChainLength

func (self Instance) JiggleDataChainLength() int

func (Instance) Mass

func (self Instance) Mass() Float.X

func (Instance) SetCollisionMask

func (self Instance) SetCollisionMask(collision_mask int)

Sets the collision mask that the Jiggle modifier will use when reacting to colliders, if the Jiggle modifier is set to take colliders into account.

func (Instance) SetDamping

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

func (Instance) SetGravity

func (self Instance) SetGravity(value Vector2.XY)

func (Instance) SetJiggleDataChainLength

func (self Instance) SetJiggleDataChainLength(value int)

func (Instance) SetJiggleJointBone2dNode

func (self Instance) SetJiggleJointBone2dNode(joint_idx int, bone2d_node string)

Sets the [Bone2D] node assigned to the Jiggle joint at [param joint_idx].

func (Instance) SetJiggleJointBoneIndex

func (self Instance) SetJiggleJointBoneIndex(joint_idx int, bone_idx int)

Sets the bone index, [param bone_idx], of the Jiggle joint at [param joint_idx]. When possible, this will also update the [code]bone2d_node[/code] of the Jiggle joint based on data provided by the linked skeleton.

func (Instance) SetJiggleJointDamping

func (self Instance) SetJiggleJointDamping(joint_idx int, damping Float.X)

Sets the amount of damping of the Jiggle joint at [param joint_idx].

func (Instance) SetJiggleJointGravity

func (self Instance) SetJiggleJointGravity(joint_idx int, gravity Vector2.XY)

Sets the gravity vector of the Jiggle joint at [param joint_idx].

func (Instance) SetJiggleJointMass

func (self Instance) SetJiggleJointMass(joint_idx int, mass Float.X)

Sets the of mass of the Jiggle joint at [param joint_idx].

func (Instance) SetJiggleJointOverride

func (self Instance) SetJiggleJointOverride(joint_idx int, override bool)

Sets whether the Jiggle joint at [param joint_idx] should override the default Jiggle joint settings. Setting this to [code]true[/code] will make the joint use its own settings rather than the default ones attached to the modification.

func (Instance) SetJiggleJointStiffness

func (self Instance) SetJiggleJointStiffness(joint_idx int, stiffness Float.X)

Sets the of stiffness of the Jiggle joint at [param joint_idx].

func (Instance) SetJiggleJointUseGravity

func (self Instance) SetJiggleJointUseGravity(joint_idx int, use_gravity bool)

Sets whether the Jiggle joint at [param joint_idx] should use gravity.

func (Instance) SetMass

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

func (Instance) SetStiffness

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

func (Instance) SetTargetNodepath

func (self Instance) SetTargetNodepath(value string)

func (Instance) SetUseColliders

func (self Instance) SetUseColliders(use_colliders bool)

If [code]true[/code], the Jiggle modifier will take colliders into account, keeping them from entering into these collision objects.

func (Instance) SetUseGravity

func (self Instance) SetUseGravity(value bool)

func (Instance) Stiffness

func (self Instance) Stiffness() Float.X

func (Instance) TargetNodepath

func (self Instance) TargetNodepath() string

func (*Instance) UnsafePointer

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

func (Instance) UseGravity

func (self Instance) UseGravity() 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