- Home /
Question by
lukwagoallan · Nov 04, 2012 at 04:11 PM ·
instantiatemovefpc
move FP controller on trigger enter?
i tried using the instantiate function but it would instantiate the controller to where i what it but then the controller would fall through the geometry and i would also end up having two Controllers in my scene..any one with a way of geting around this pliz HELP
below is an extract of my code
var mycube : GameObject;
var positionCube : Vector3;
var rotationCube : Quaternion;
private var fps : GameObject;
function Start () {
fps= GameObject.FindWithTag("Player");
positionCube=mycube.transform.position;
rotationCube=mycube.transform.rotation;
}
function OnGUI(){
if(GUI.Button(Rect(Screen.width/2 -75,Screen.height/2+10,200,30), "Gardens")){
Instantiate(fps,positionCube,rotationCube);
}
}
e
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613083313im_/https://answers.unity.com/themes/thub/images/avi.jpg)