class_dampedspringjoint2d - dragonsoulz/godot GitHub Wiki
DampedSpringJoint2D
####Inherits: Joint2D ####Category: Core
Brief Description
Damped sprint constraint for 2D physics.
Member Functions
- void set_length ( float length )
- float get_length ( ) const
- void set_rest_length ( float rest_length )
- float get_rest_length ( ) const
- void set_stiffness ( float stiffness )
- float get_stiffness ( ) const
- void set_damping ( float damping )
- float get_damping ( ) const
Description
Damped sprint constraint for 2D physics. This resembles a sprint joint that always want to go back to a given length.
Member Function Description
set_length
- void set_length ( float length )
Set the maximum length of the sprint joint.
get_length
- float get_length ( ) const
Return the maximum length of the sprint joint.
set_rest_length
- void set_rest_length ( float rest_length )
Set the resting length of the sprint joint. The joint will always try to go to back this length when pulled apart.
get_rest_length
- float get_rest_length ( ) const
Return the resting length of the sprint joint. The joint will always try to go to back this length when pulled apart.
set_stiffness
- void set_stiffness ( float stiffness )
Set the stiffness of the spring joint.
get_stiffness
- float get_stiffness ( ) const
Return the stiffness of the spring joint.
set_damping
- void set_damping ( float damping )
Set the damping of the spring joint.
get_damping
- float get_damping ( ) const
Return the damping of the spring joint.