Godot Version
v4.2.2.stable.official [15073afe3]
Question
How to make sure that after hitting a spike the player spawns next to it? For example, like in the game Hollow Knight
I know a couple of options, for example, using a timer to update a variable that stores the player’s position every second, but I’m not sure that this is the best option. I also know what can be done near each edge of the earth at the spikes there are checkpoints, but I don’t know how to do it, and it seems to me that it’s not practical because The map in my game is large.How to make sure that after hitting a spike the player spawns next to it? For example, like in the game Hollow Knight.
I know of a couple of options, like using a timer to update a variable that stores the player’s position every second, but I’m not sure if that’s the best option. I also know that there are checkpoints on the spikes near each edge of the earth, but I don’t know how to do it, and it seems to me that it’s impractical, because… The map in my game is large. Please tell me what would be better and how to implement it!