godot
godot copied to clipboard
DampedSpringJoint2D doesn't respect max length/distance
Godot version
v4.0.stable.official [92bee43ad]
System information
Ubuntu, Godot Forward+
Issue description
Issue:
- The documentation about DampedSpringJoint2D states that
length
is "The spring joint's maximum length. The two attached bodies cannot stretch it past this value.". - This doesn't seem to be true, as also this old Reddit post indicates (which states it's the initial distance or length, not the max length).
Test setup:
- Two rigid bodies are exactly 100px apart
- The spring is connected to both bodies and the max length is set to 100px
- When they fall down due to gravity, the "mountain" shoves them apart much further than the specified distance
- Expected behaviour: The bodies stay close to the top of the mountain due to the spring's max length
Conclusion: Maybe this is just a mistake in the documentation or it really is a bug. If it's a documentation issue it would be great to have max length as a feature.
Steps to reproduce
- Create two RigidBody2D
- Create DampedSpringJoint2D connected to the bodies
- Set a max and rest length
- Create situation where the bodies move away from each other (it helps upping the weight of the bodies)
- See distance becoming greater than max distance