DistanceJoint
API reference for DistanceJoint. Access via the 'physics' submodule.
Experimental API:
The physics submodule is a VERY experimental and new API that is highly susceptible to breaking changes in the future.
Inherits from Joint.
Properties
| Name | Description | Type |
|---|---|---|
current_length | The current length between the anchors. | float |
length | The rest length of the joint. | float |
limit_enabled | Whether the length limits are enabled. | bool |
max_length | The maximum length limit. | float |
max_motor_force | The maximum motor force. | float |
min_length | The minimum length limit. | float |
motor_enabled | Whether the motor is enabled. | bool |
motor_force | The current motor force. | float |
motor_speed | The target motor speed. | float |
spring_damping_ratio | The spring damping ratio. | float |
spring_enabled | Whether the spring is enabled. | bool |
spring_hz | The spring frequency in Hertz. | float |
Methods
Set Length Range
set_length_range(
min_length: SupportsFloat,
max_length: SupportsFloat
) → NoneSet the minimum and maximum length limits.
Args
min_length: The minimum length.max_length: The maximum length.