- Home /
How to stop the mouse looking around when in a trigger?
So, i'm using the first person controller and have some NPC dialog going, with options to select from. The only annoying thing is when you drag the mouse down, the camera keeps moving.
Comment
Answer by Invertex · Jan 22, 2014 at 07:04 AM
Just store your current camera position OnTriggerEnter, and then during OnTriggerStay, have the camera position constantly equal that value, should work...
Or create a bool in your camera script that can disable the camera movement part of the script if a trigger sets it false.
Use of a Boolean flag would be the better approach. Just don't move the camera when the flag is false.
Your answer
![](https://koobas.hobune.stream/wayback/20220613131112im_/https://answers.unity.com/themes/thub/images/avi.jpg)