- Home /
Best Answer
Answer by kennypu · Mar 14, 2011 at 07:08 PM
Assuming you're using javascript, first make a global variable like:
var respawnLocation:Vector3;
then on the start of the game, just store the character's position (this assumes the script is attached to the object):
function Start() { respawnLocation = gameObject.transform.position; }
and now just use that respawnLocation variable when you want to go back to that location.
Your answer
Follow this Question
Related Questions
Record Object's Position 2 Answers
How can I store each axis of a transform's rotation as a separate variable? 2 Answers
How to calculate an end point of a line after rotating an angle in three-dimensional space? Thanks! 1 Answer
How can i get the index of an array[] as int? 0 Answers
help with checkpoint sytem C# 2 Answers