Quantcast
Channel: Questions in topic: "lockcursor"
Browsing all 92 articles
Browse latest View live

Cursor.LockState = CursorLockMode.Locked doasnt works.

i wanted to create a pause menu screen and make it when it is on the cursor lock mode is in none and when the menu is off the cursor is locked, but when i try to lock exiting from the menu it doasnt...

View Article


Mouse won't unlock in WebGL build but does in the editor

I'm using this code: (in an Update function) if (Input.GetKeyDown (KeyCode.Escape)) { unlock = true; } if (unlock) { Cursor.lockState = CursorLockMode.None; Cursor.visible = true; Screen.fullScreen =...

View Article


CursorLockMode.Locked puts cursor above actual center

I'm using the default FirstPersonController downloaded from Asset Store. My problem is that CursorLockMode.Locked (inside MouseLook.cs) doesn't correctly center the cursor. I need it to be perfectly at...

View Article

"Cursor.lockState = CursorLockMode.Locked" causes Unity to run in slow motion

When I move the mouse, it takes awhile for the affects of my movement to take effect, and it also makes the Unity editor unresponsive since it takes several extra seconds (increasingly longer the...

View Article

How can I move the mouse position whilst key is pressed?

I'm using Unity 5.5.2 and even if I create a new Unity project, in the editor, if I hold down a key (any key), then my mouse position locks and I cannot move it. I want my player to move towards my...

View Article


void Update problem

Hello, I created door with keypad script. Everything works fine except if the doors open Im not able to use my pause script. After doors open and i use pause script the player can rotate which doesnt...

View Article

Camera Lock on GUI

I've made a Pause menu for my mini game, but for some reason when i hit escape for the first time, the camera wont stop moving.Its only after i go back into the game and press it again that it works....

View Article

Cursor.LockState = CursorLockMode.Locked doesn‘t works。

i wanted to create a pause menu screen and make it when it is on the cursor lock mode is in none and when the menu is off the cursor is locked, but when i try to lock exiting from the menu it doasnt...

View Article


How can i lock the mouse cursor in the middle of the screen ?

What i'm doing now is in the Update: void Update () { Cursor.lockState = CursorLockMode.Locked; Cursor.lockState = CursorLockMode.None; } But that make the cursor shaking/stuttering when moving the...

View Article


Cursor not locking in center of screen?

So I wrote a movement script that includes a cursor lock and hide function. The problem is, is that when I unlock the cursor with the Escape key, the cursor can freely move around. That is what I...

View Article

Cant unlock cursor with FPS prefab

I cant figure out how to unlock the cursor fully with the Controller FPS prefab. I basicly need to xecute that code in a if statment (c#).

View Article

How to lock cursor in WebGL

Hello, At this point I am quite desperate so I decided to seek help personally. I have this ([project][1]) and in my newest build, when I looked around it would snap back ( probably after the cursor...

View Article

How to lock the cursor without moving to the center? (С#)

HELP PLS!!! (С#) I know how to lock the cursor, but it moves to the center, but I do not need it, I need it from the same place where I clicked.

View Article


Can you lock the cursor to specific coordinates?

Hi! I want to click and hold the left MouseButton and lock the cursor while holding to the exact coordinates where I clicked. Is this somehow possible? thanks in advance.

View Article

Screen.lockCursor for web player?

I don't think Screen.lockCursor = true; is working when I build for web player..

View Article


screen.lockcursor locks the cursor in wrong place

void Start () { Screen.lockCursor = false; Screen.lockCursor = true; } // Update is called once per frame void Update () { if(Input.GetKeyUp(KeyCode.Tab)) { Screen.lockCursor = !Screen.lockCursor; } }...

View Article

Fake, clamped cursor in WebBuild

I'm making a gesture heavy game (simple but "broad" gestures). As a result I want to clamp the mouse to the game window so that errant gestures don't end up switching you away from the game. It's...

View Article


Need to play lock-on sound only once when crosshair placed onto enemy

Hi, I have a script which adds the enemies within a trigger to an array, finds the closest one to the player and then places the crosshair onto them and fires in their direction. What I would like to...

View Article

How to lock cursor NOT always center on view?

Screen.lockCursor always make the cursor centered without an option. Any way to do this in unity?

View Article

Screen.lockCursor with two screens

Hi I have the following problem. I use Screen.lockcursor. Works perfectly with one screen but with 2 screens if I open the application and before it finished loading i change the mouse to the other...

View Article
Browsing all 92 articles
Browse latest View live