- Home /
FPSContoller Teleportation Script is blocking somehow
Hi I made a little script for FPSController teleportation but script makes teleporting and teleporting back to old location only for a moment. What is blocking this script
case "f":
{
_oyuncu = GameObject.Find("FPSController").GetComponent<Transform>();
Vector3 asa = new Vector3(-52, 15, -21);
_oyuncu.transform.position = asa;
break;
}
Answer by wolfgangmami · Feb 07, 2020 at 07:07 PM
Alright my fault I did this on Update method too fast for human input so How can I get this working
Answer by rh_galaxy · Feb 07, 2020 at 07:20 PM
I guess that something is setting the transform every frame, so you setting it doesn't stick. Does the FPSController have a RigidBody or something with a position you can set? You should find out and then modify that instead of the transform I think.
$$anonymous$$y "FPSContoller" object is given by unity standart assets pack and yes it has Rigidbody. I think what if I disable it somehow and get this working ? While searching I find a idea but this is little bit tricky before the teleportation if I disable "FirstPersonController" script and re-enable it after teleportation it is working but I said this is tricky and hard to handle for my knowledge ($$anonymous$$aybe I can use wait command or something but I think this is not efficient and wrong way to do this)
Alright I solved this with Coroutine but I think this is not effective I'm open for other solutions
Your answer
![](https://koobas.hobune.stream/wayback/20220612222925im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Teleporting Objects,Teleporting Object 0 Answers
Teleportation 1 Answer
Car made of boxes teleports on hard collision 0 Answers
how to make something teleport,how to change the place where something is 0 Answers