Author Topic: UICamera and cursor problem  (Read 5194 times)

DJVDJV

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
UICamera and cursor problem
« on: July 16, 2015, 01:20:06 PM »
Hello,

I have problem with cursor and NGUI UICamera.

UICamera.cs rows 505-509

Cursor lockstate cause problem:
This cause my cursor jump middle of screen every time when I keep for example character movement button pressed down.

If I chance lockstate --> CursorLockMode.None, this will fix problem.

Might I do something or is there bug? I this "jumping cursor" known problem that can be fixed without touching NGUI code?

If I do my own "workaround" with lockstate will I broke something that I do not know?

Got Unity: 5.1.1 and latest NGUI

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UICamera and cursor problem
« Reply #1 on: July 16, 2015, 11:03:29 PM »
This happens because you specified the same axes on UICamera as you use for character movement. NGUI does GetAxis checks for joystick input, and your keyboard keys effectively fake joystick input as far as Unity is concerned.

Either disable controller input on UICamera, or remove the axis names from UICamera.