(Solved) Help setting up the cursor lock.
Posted: Sat Dec 07, 2019 9:09 am
I'm using an FPS controller that I created for my player controls. Its using to lock the cursor as it uses a raycast for interaction but, when I import the Dialogue System for Unity it no longer locks the cursor. I assume that this is due to needing the cursor to interact with the dialogue ui. I can create a state system that when I start a conversation that it unlocks the cursor and locks it after conversation has ended. I just need to know how to setup the cursor lock at the start of the game and how I unlock it. I tried adding to the start method on my player but, that didn't work. I couldn't find any info on how to do the locking and unlocking so, I'm unsure of what to do. Can any1 help please?
Code: Select all
Cursor.lockState = CursorLockMode.Locked
Code: Select all
PixelCrusher.CursorControl.LockCursor(true)