PhysicalBone2D

package
v0.0.0-...-c909628 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

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

type Instance

type Instance [1]gdclass.PhysicalBone2D

The [PhysicalBone2D] node is a [RigidBody2D]-based node that can be used to make [Bone2D]s in a [Skeleton2D] react to physics. [b]Note:[/b] To make the [Bone2D]s visually follow the [PhysicalBone2D] node, use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] parent. [b]Note:[/b] The [PhysicalBone2D] node does not automatically create a [Joint2D] node to keep [PhysicalBone2D] nodes together. They must be created manually. For most cases, you want to use a [PinJoint2D] node. The [PhysicalBone2D] node will automatically configure the [Joint2D] node once it's been added as a child node.

var Nil Instance

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

func New

func New() Instance

func (Instance) AsCanvasItem

func (self Instance) AsCanvasItem() CanvasItem.Instance

func (Instance) AsCollisionObject2D

func (self Instance) AsCollisionObject2D() CollisionObject2D.Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode2D

func (self Instance) AsNode2D() Node2D.Instance

func (Instance) AsObject

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

func (Instance) AsPhysicalBone2D

func (self Instance) AsPhysicalBone2D() Instance

func (Instance) AsPhysicsBody2D

func (self Instance) AsPhysicsBody2D() PhysicsBody2D.Instance

func (Instance) AsRigidBody2D

func (self Instance) AsRigidBody2D() RigidBody2D.Instance

func (Instance) AutoConfigureJoint

func (self Instance) AutoConfigureJoint() bool

func (Instance) Bone2dIndex

func (self Instance) Bone2dIndex() int

func (Instance) Bone2dNodepath

func (self Instance) Bone2dNodepath() string

func (Instance) FollowBoneWhenSimulating

func (self Instance) FollowBoneWhenSimulating() bool

func (Instance) GetJoint

func (self Instance) GetJoint() [1]gdclass.Joint2D

Returns the first [Joint2D] child node, if one exists. This is mainly a helper function to make it easier to get the [Joint2D] that the [PhysicalBone2D] is autoconfiguring.

func (Instance) IsSimulatingPhysics

func (self Instance) IsSimulatingPhysics() bool

Returns a boolean that indicates whether the [PhysicalBone2D] is running and simulating using the Godot 2D physics engine. When [code]true[/code], the PhysicalBone2D node is using physics.

func (Instance) SetAutoConfigureJoint

func (self Instance) SetAutoConfigureJoint(value bool)

func (Instance) SetBone2dIndex

func (self Instance) SetBone2dIndex(value int)

func (Instance) SetBone2dNodepath

func (self Instance) SetBone2dNodepath(value string)

func (Instance) SetFollowBoneWhenSimulating

func (self Instance) SetFollowBoneWhenSimulating(value bool)

func (Instance) SetSimulatePhysics

func (self Instance) SetSimulatePhysics(value bool)

func (Instance) SimulatePhysics

func (self Instance) SimulatePhysics() bool

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