You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a RigidBody2D is connected to a scaled StaticBody2D with a Joint2D at runtime, the joint attaches the RigidBody2D to the unscaled location of the StaticBody2D instead of the scaled location.
This applies to PinJoint2D, DampedSpringJoint2D and GrooveJoint2D.
To Reproduce
Steps to reproduce the behavior:
Open the attached project
Install godot-rapier-2d-single-simd-parallel v0.8.8 from the AssetLib
Run the project
Click one of the buttons (plank / box)
Press V to bring up a joint
Hold LMB with the joint over one of the StaticBody2Ds to spawn an object
Expected behavior
The joint connects the RigidBody2D to the StaticBody2D at the displayed location instead of jumping all the way over to the pre-scaled location.
This expected behaviour is what is observed in Godot's default physics engine.
Godot's default physics engine doesn't seem to respect disable_collision/add_collision_exception_with for some reason, but that's a different issue entirely.
I just did some further testing, and when applying a scale to a RigidBody2D, the editor gives the following warning:
"Size changes to RigidBody2D will be overridden by the Physics Engine when running.
Change the size in children collision shapes instead."
However, this warning is not displayed when applying a scale to a StaticBody2D, and the behaviour is different.
When this warning is displayed on a RigidBody2D and you run the scene, the size is actually adjusted, whereas the size of the StaticBody2D is not visibly adjusted, and regular collisions use the scaled size of the StaticBody2D correctly.
Describe the bug
When a RigidBody2D is connected to a scaled StaticBody2D with a Joint2D at runtime, the joint attaches the RigidBody2D to the unscaled location of the StaticBody2D instead of the scaled location.
This applies to PinJoint2D, DampedSpringJoint2D and GrooveJoint2D.
To Reproduce
Steps to reproduce the behavior:
Open the attached project
Install godot-rapier-2d-single-simd-parallel v0.8.8 from the AssetLib
Run the project
Click one of the buttons (plank / box)
Press V to bring up a joint
Hold LMB with the joint over one of the StaticBody2Ds to spawn an object
Expected behavior
The joint connects the RigidBody2D to the StaticBody2D at the displayed location instead of jumping all the way over to the pre-scaled location.
This expected behaviour is what is observed in Godot's default physics engine.
Godot's default physics engine doesn't seem to respect disable_collision/add_collision_exception_with for some reason, but that's a different issue entirely.
Environment:
Example project(zip)
rapier_game_test_issue.zip
The text was updated successfully, but these errors were encountered: