- Home /
Lock the Mouse/ Camera-Movement
I have a game with a chat box. I hit enter to type in my text, what I'd like to have happen is that the current camera position to "lock" when I do it so that moving the mouse will not cause the camera to move until I "unlock it" by hitting Enter again.
My code is built on top of the Island demo.
There have been any number of games, even AA titles where the view goes crazy when you mouse out to do something else.
I'd be willing to pay a few bucks for an answer.
Answer by flaviusxvii · May 10, 2011 at 08:32 PM
Just add a global variable to enable/disable whichever mouse-look script you're using when you enter typing mode.
Personally, I don'y like mouse-look that is always on. I change it to that it only works when you're holding down the RMB (depending on the game of course, but generally that's what I like).
I have about 15 different projects going on and this sounds like something you could knock out in an hour or less. Would you be interested in making the modification to this demo and bill me for your time: http://showcase.smartfoxserver.com/unity/SFSIslandDemo.zip
Your answer
Follow this Question
Related Questions
Rotating object with GUI Elements present 2 Answers
Update camera position and viewport with border image with mouse input 0 Answers
Cross platform camera controlls 0 Answers
Roll a ball camera with rotating by a mouse? 1 Answer
Mouse Camera Control 0 Answers