Skip to content

Commit 78ceff3

Browse files
authored
checkpoint: Make player spawn in front, not behind (#2153)
The player spawns at the position of the SpawnPoint inside this node, previously identical to the Checkpoint node itself. As a result, on respawn the player and the checkpoint have the same y-sort level, and their position in the scene tree determines which one is displayed in front of the other. The player is earlier in the scene tree in most scenes, so the later-in-tree checkpoint wins. Move the SpawnPoint one pixel downwards, so that the player "wins". Also offset the sprite a little more. This breaks our normal model where the origin of the scene is aligned with the middle of the sprite's shadow. However the witch is a bit of a strange shape - the yarn is way below it - and I think that sorting behind the witch as soon as you walk above the yarn (as with this change) looks better. Resolves #1332
1 parent 9a949de commit 78ceff3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scenes/game_elements/props/checkpoint/checkpoint.tscn

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ script = ExtResource("1_kkoqv")
1515

1616
[node name="SpawnPoint" type="Marker2D" parent="." unique_id=118546798 groups=["spawn_point"]]
1717
unique_name_in_owner = true
18+
position = Vector2(0, 1)
1819
script = ExtResource("2_s5d1s")
1920

2021
[node name="Sprite" type="AnimatedSprite2D" parent="." unique_id=422090831]
2122
unique_name_in_owner = true
22-
position = Vector2(0, -40)
23+
position = Vector2(0, -64)
2324
sprite_frames = ExtResource("4_3xcwf")
2425
animation = &"idle"
2526
autoplay = "idle"

0 commit comments

Comments
 (0)