I made a script for a FPS Game, wich lets your character fly. I already made the script for the flying guy, it works perfectly, but when i try to enter in fly mode, the object dosn't instantiate exactly in the old Player's position. This is the script:
var FlyMode : GameObject;
var Player : GameObject;
var FlyCamera : GameObject;
function Start(){
FlyCamera.SetActiveRecursively(false);
}
function Update()
{
if(Input.GetKeyUp("f")){
var clone : GameObject = Instantiate(FlyMode, transform.position, transform.rotation);
Player.SetActiveRecursively(false);
FlyCamera.SetActiveRecursively(true);
}
}