-1

I've a player to which I've attached character controller and two scripts - Controller and MouseLooker to control the player movements but when I try to move my mouse cursor while pressing keyboard key(s), my mouse cursor gets locked. When I release the keyboard keys(s) it starts working.

How should I fix this to get both keyboard and mouse to work at the same time?

Vaillancourt
  • 16,325
  • 17
  • 55
  • 61
Shantanu Singh
  • 345
  • 2
  • 5
  • 10

1 Answers1

0

This looks like it is related to something in the UPDATE() method on your MouseLooker script.

The LockCursor() calls need some tweaking.

Is this happening with only 1 keyboard key, or several keyboard keys?

Also, you may get more insight into what is happening if you added some "print()" calls in your "UPDATE()" methods, which output the cursor lock state, and some other code based values to help you troubleshoot.

Danoweb
  • 127
  • 2