Author Topic: NGUI with locked/not shown mouse  (Read 2128 times)

stkiller

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
NGUI with locked/not shown mouse
« on: October 20, 2014, 01:18:10 AM »
Hello,

Unity's software mouse doesn't behave well in game - the input is jagged and doesn't allow smooth drag and drop.
I think it would be nicer to have a custom software mouse, based on it's own acceleration and smoothed axis raw input.

The question is - how is it possible to get NGUI controlls to react to a custom cursor, which has position set as described before?
I tried to replace all Input.mousePosition with the value affected by my calculations, but nothing happens.

Could you please help me?
Thank you in advance!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI with locked/not shown mouse
« Reply #1 on: October 20, 2014, 11:31:05 PM »
You would need to create a custom input method (UICamera.onCustomInput). Just feed UICamera.ProcessTouch with the right values. Have a look at UICamera.ProcessFakeTouches function for an example.