Has anybody had any luck setting up their mouse 0 input to control ToggleCursor on downclick and stop on upclick? I've tried both the old and new Unity Input Systems and haven't figured it out yet.
I'm trying to make single click escape room like WebGL game similar to this game built in unity: https://www.crazygames.com/game/laqueus-escape
Thanks!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Going by the WebGL game you linked to, I'm guessing this isn't so much about "ToggleCursor" exactly, as just being able to click-and-drag to rotate the camera?
There's a couple of ways you could try this:
1) Use First Person mode, then add a custom script to your scene or Player that toggles the cursor lock manually based on mouse input. For this, you'd need to remove "ToggleCursor" from your Input Manager, as this will override it:
2) Instead of first person, set your Movement method to None, and rely on individual third-person cameras instead (listed as GameCamera ThirdPerson in the Scene Manager.
This camera type supports drag-controlling, and if its Distance from target is small enough, it could be made to feel like a first-person camera. A similar trick was done for the "main view" camera in the Physics Demo.