Gravity goes to the right when using PinJoint2D

Godot Version

v4.3.stable.flathub [77dcf97d8]

Question

Hello,

I’m trying to get a stick (a RigidBody2D) to hang down from a ceiling (a StaticBody2D) using a PinJoint2D, but it always seems to be attracted to the right instead – just as if gravity was working to the right. I triple-checked and gravity is set to the positive y direction, and other unattached RigidBodies do fall down as expected.

I didn’t add any forces or motors in this project.

Why does my stick want to go to the right?

Here’s my node.tscn (this forum doesn’t allow me to upload text or zip files):

[gd_scene format=3 uid="uid://cjr7ldukwdrok"]

[node name="Node2D" type="Node2D"]

[node name="ceiling" type="StaticBody2D" parent="."]
position = Vector2(480, 92)

[node name="Polygon2D" type="Polygon2D" parent="ceiling"]
position = Vector2(-458, -116)
polygon = PackedVector2Array(301, 109, 296, 181, 662, 178, 663, 100)

[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ceiling"]
position = Vector2(-458, -117)
polygon = PackedVector2Array(295, 111, 297, 182, 658, 177, 665, 105)

[node name="stick" type="RigidBody2D" parent="."]
position = Vector2(474, 289)

[node name="Polygon2D" type="Polygon2D" parent="stick"]
position = Vector2(-470, -328)
polygon = PackedVector2Array(437, 251, 441, 446, 510, 445, 507, 255)

[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="stick"]
position = Vector2(-467, -333)
polygon = PackedVector2Array(439, 252, 440, 446, 504, 443, 505, 255)

[node name="PinJoint2D" type="PinJoint2D" parent="."]
position = Vector2(482, 183)
node_a = NodePath("../ceiling")
node_b = NodePath("../stick")

[node name="ball" type="RigidBody2D" parent="."]
position = Vector2(948, 578)

[node name="Polygon2D" type="Polygon2D" parent="ball"]
position = Vector2(-507.2, -612.8)
polygon = PackedVector2Array(437, 251, 441, 446, 510, 445, 507, 255)

[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ball"]
position = Vector2(-504.2, -617.8)
polygon = PackedVector2Array(439, 252, 440, 446, 504, 443, 505, 255)

and project.godot (I don’t think I changed anything in it):

; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
;   [section] ; section goes between []
;   param=value ; assign values to parameters

config_version=5

[application]

config/name="Joint Attempt 2"
run/main_scene="res://node_2d.tscn"
config/features=PackedStringArray("4.3", "GL Compatibility")
config/icon="res://icon.svg"

[rendering]

renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"