HingeJoint3D

package
v0.0.0-...-a66c66c Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package HingeJoint3D provides methods for working with HingeJoint3D 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
	AsHingeJoint3D() 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]) AsHingeJoint3D

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

func (*Extension[T]) AsJoint3D

func (self *Extension[T]) AsJoint3D() Joint3D.Instance

func (*Extension[T]) AsNode

func (self *Extension[T]) AsNode() Node.Instance

func (*Extension[T]) AsNode3D

func (self *Extension[T]) AsNode3D() Node3D.Instance

func (*Extension[T]) AsObject

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

type Flag

type Flag int //gd:HingeJoint3D.Flag
const (
	/*If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects.*/
	FlagUseLimit Flag = 0
	/*When activated, a motor turns the hinge.*/
	FlagEnableMotor Flag = 1
	/*Represents the size of the [enum Flag] enum.*/
	FlagMax Flag = 2
)

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

type Instance [1]gdclass.HingeJoint3D

A physics joint that restricts the rotation of a 3D physics body around an axis relative to another physics body. For example, Body A can be a [StaticBody3D] representing a door hinge that a [RigidBody3D] rotates around.

var Nil Instance

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

func New

func New() Instance

func (Instance) AsHingeJoint3D

func (self Instance) AsHingeJoint3D() Instance

func (Instance) AsJoint3D

func (self Instance) AsJoint3D() Joint3D.Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode3D

func (self Instance) AsNode3D() Node3D.Instance

func (Instance) AsObject

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

func (Instance) GetFlag

func (self Instance) GetFlag(flag Flag) bool

Returns the value of the specified flag.

func (Instance) GetParam

func (self Instance) GetParam(param Param) Float.X

Returns the value of the specified parameter.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) SetFlag

func (self Instance) SetFlag(flag Flag, enabled bool)

If [code]true[/code], enables the specified flag.

func (*Instance) SetObject

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

func (Instance) SetParam

func (self Instance) SetParam(param Param, value Float.X)

Sets the value of the specified parameter.

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

type Param

type Param int //gd:HingeJoint3D.Param
const (
	/*The speed with which the two bodies get pulled together when they move in different directions.*/
	ParamBias Param = 0
	/*The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code].*/
	ParamLimitUpper Param = 1
	/*The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code].*/
	ParamLimitLower Param = 2
	/*The speed with which the rotation across the axis perpendicular to the hinge gets corrected.*/
	ParamLimitBias     Param = 3
	ParamLimitSoftness Param = 4
	/*The lower this value, the more the rotation gets slowed down.*/
	ParamLimitRelaxation Param = 5
	/*Target speed for the motor.*/
	ParamMotorTargetVelocity Param = 6
	/*Maximum acceleration for the motor.*/
	ParamMotorMaxImpulse Param = 7
	/*Represents the size of the [enum Param] enum.*/
	ParamMax Param = 8
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL