DampedSpringJoint2D

Damped spring constraint for 2D physics.

This resembles a spring joint that always wants to go back to a given length.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

getDamping
double getDamping()
getLength
double getLength()
getRestLength
double getRestLength()
getStiffness
double getStiffness()
opAssign
DampedSpringJoint2D opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(DampedSpringJoint2D other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
setDamping
void setDamping(double damping)
setLength
void setLength(double length)
setRestLength
void setRestLength(double rest_length)
setStiffness
void setStiffness(double stiffness)

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

damping
double damping [@property setter]

The spring joint's damping ratio. A value between 0 and 1. When the two bodies move into different directions the system tries to align them to the spring axis again. A high damping value forces the attached bodies to align faster. Default value: 1

damping
double damping [@property getter]

The spring joint's damping ratio. A value between 0 and 1. When the two bodies move into different directions the system tries to align them to the spring axis again. A high damping value forces the attached bodies to align faster. Default value: 1

length
double length [@property getter]
double length [@property setter]

The spring joint's maximum length. The two attached bodies cannot stretch it past this value. Default value: 50

restLength
double restLength [@property getter]
double restLength [@property setter]

When the bodies attached to the spring joint move they stretch or squash it. The joint always tries to resize towards this length. Default value: 0

stiffness
double stiffness [@property getter]
double stiffness [@property setter]

The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. Default value: 20

Static functions

_new
DampedSpringJoint2D _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta