Skip to content

Commit c34a2b4

Browse files
authored
Merge pull request #348 from texaco/master
Fix seesaw falling plank from 2d demo
2 parents d29b987 + 98e60d4 commit c34a2b4

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

2d/physics_platformer/background/Seesaw.tscn

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
[gd_scene load_steps=4 format=2]
1+
[gd_scene load_steps=5 format=2]
22

33
[ext_resource path="res://background/plank.png" type="Texture" id=1]
44
[ext_resource path="res://background/plankpin.png" type="Texture" id=2]
55

66
[sub_resource type="RectangleShape2D" id=1]
77
extents = Vector2( 128, 8 )
88

9+
[sub_resource type="RectangleShape2D" id=2]
10+
extents = Vector2( 16, 27 )
11+
912
[node name="Seesaw" type="Node2D"]
1013

1114
[node name="Plank" type="RigidBody2D" parent="."]
@@ -18,9 +21,15 @@ texture = ExtResource( 1 )
1821
shape = SubResource( 1 )
1922

2023
[node name="Pin" type="PinJoint2D" parent="."]
21-
node_a = NodePath("../plank")
24+
node_a = NodePath("../Plank")
25+
node_b = NodePath("../Pillar")
26+
27+
[node name="Pillar" type="StaticBody2D" parent="."]
2228

23-
[node name="Sprite" type="Sprite" parent="."]
29+
[node name="Sprite" type="Sprite" parent="Pillar"]
2430
position = Vector2( -0.290825, 20.2425 )
2531
texture = ExtResource( 2 )
2632

33+
[node name="CollisionShape2D" type="CollisionShape2D" parent="Pillar"]
34+
position = Vector2( 0, 25 )
35+
shape = SubResource( 2 )

0 commit comments

Comments
 (0)