- Home /
Override MouseLook/FirstPersonController
So in my game I would like to override the mouselook functionality to change the camera to look in a specific direction and after that let mouselook take over again. The problem is that, yes, it is indeed possible to disable it, but when I reenable the mouselook it will take the camera back to the position it was before I disabled it. It basicly ignores what rotation it currently is, it just takes into consideration what it was. I have also tried to destroy the FirstPersonController(the holder of the MouseLook object) and then add it again, but then I get an error saying:
transform.localRotation assign attempt for 'FirstPersonCharacter' is not valid. Input rotation is { NaN, NaN, NaN, NaN }
It would be great if you could give me some advice on how to override the mouselook properly or help me fix the error I get.
Thanks in advance :-)