I thought that this would be a simple task. When you hit left shift your x and y position is recoded because I am making a 2.5D game. Then if you hit left CTRL you should teleport back to where you hit shift. However I can not get it to work here is the code:
function Update () {
if( Input.GetButtonDown("Fire1")){
var playerX = transform.position.x;
var playerY = transform.position.y;
var playerRotation = transform.rotation;
print("X = "+playerX);
print("Y = "+playerY);
print("Rotation = "+transform.rotation);
}
if(Input.GetButtonDown("Fire2")){
transform.position = new Vector3(3,0,0);
transform.rotation = playerRotation;
}
}