Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Pneuma |
I have no idea what could possibly be causing this, I have an Area2D with a collision shape and a sprite(which is part of a tilemap). I’ve connected the Area2D to the Sprite with the following code:
func _on_Area2D_body_entered(body):
if body.name == "Player":
$AnimationPlayer.play("Checkpointed")
body.spawn_point = position
The animation does play when the player comes in range, however it always spawns under the map.
I’ve also tried connecting the Area2D to itself and used the same code (dont know if that was smart), however the player just respawns in its “original” spawnpoint at the start of the map.
Any ideas?