- Home /
Question by
The_Magical_Muffins · Oct 07, 2016 at 07:15 PM ·
charactercontrollermouselookfpscontroller
How To fix FPSController(not looking correctly)
I am working on a game rn and the player goes into a portal and the scene switches. now when I do that my character can still look up and down but when I return to the previous scene he can not. FYI I have DoNotDestroyOnLoad on my character on a different script. and the character preset is the one from unity standard assets.
Script to go to scene there:
function OnTriggerEnter(other : Collider){
//If a gameObject with the tag "Player" enters this trigger, load a scene.
if(other.gameObject.tag == "Player"){
Application.LoadLevel("house");
}
}
script to go back to original scene:
function OnTriggerEnter(other : Collider){
//If a gameObject with the tag "Player" enters this trigger, load a scene.
if(other.gameObject.tag == "Player"){
Application.LoadLevel("mainscenemustache");
}
}
Comment
loadlevel is obsolete, try using the new scenemanager sceneload ins$$anonymous$$d... heres a tutorial... https://www.youtube.com/watch?v=S9h_iu4Zx5I