Search the Community
Showing results for tags 'lock cursor'.
Found 3 results
I recently upgraded to Unity 5.0.2 (yay new stuff) because I was told that a lot of what was pro features are now free, yay. I was messing around with the unity kit and I decided to remove the lock-cursor menu due to compiler errors, I also set the starting TimeFrame to 1 in Project settings. Since I deleted the Lock Cursor script, I searched for a new one, since Unity transitioned from Screen.lockcursor to Cursor.lockState. http://docs.unity3d.com/ScriptReference/Cursor-lockState.html The game worked fine without the lock script, allows my character to walk around, shoot, jump etc etc however after I attached the code, it was causing issues. Camera.lockState = Locked worked just fine, it locked my cursor to the center, yay, however it also decided to lock my camera rotation too. When I press escape and my mouse is free then my camera can move free again, until I click on the screen to shoot or aim, which it will then lock my camera's rotation to that position. I've tried all sorts of codes, even quickly spruced up my own, however I found that it was Cursor.lockState that was definitely the issue. I'm using FPSKit 1.3.5 when trying this. Is there something I'm doing wrong? I tried googling this to no avail. Also to note that I'm far from genius when it comes to coding, I'm on the level of script kiddie. Does anyone else have a code that they feel might fix my issue? Edit: Is there also a way to fix the SunShafts script? It works just fine itself except that locks Y rotation and duplicates both the weapon view and the main camera view to overlap, strangely.
So I wanted to know if there's a way with Oma's fps kit (1.3.5) to instead of having the "Lock Cursor" script, if there's a way just to lock the cursor when the scene is loaded. But i'd like it to still work with the Mouse Look scripts, does anyone know how I might be able to make this?
So, Perfect timing: Right in the middle of me making my video game, my Asset Store has completely broke. No idea how, but that's not important. I'd like to know how I can make my games controls for Xbox or a console. Does anyone know where I might be able to start off? Possibly a tutorial or something?