I am new at unity. I want to make a script that makes you respawn from the point you start when you fall off the terrain. Could you please help me?
What I would do:
- Have a game object called ‘SpawnPoint’ where I want to always spawn into.
- When you instantiate your player, set his position (and rotation) same as SpawnPoint’s
- Have a large Box Collider on an object, positioned below the terrain, and extending out from all sides (like a ‘saftey net’ they fall into), set to ‘is trigger’ and put a script on that that handles OnColliderEnter which resets the position/rotation of the player to that of SpawnPoint’s
Can you please simplify that down some more if you can. I am really confused:/