Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Cabal on January 16, 2014, 10:01:31 AM

Title: Bug in UICamera / ProcessFakeTouches
Post by: Cabal on January 16, 2014, 10:01:31 AM
Hi,

Looking at ProcessFakeTouches in UICamera.cs, we had to make one small change for the mouse to work.
In the if statement, when it sets the current touch to mMouse[0], it currently sets the currentTouchID to 1.

Looking at the comments at the top of the file, the touch ID to use for the left mouse button is -1.

We changed the line from:
  1. currentTouchID = 1;
to
  1. currentTouchID = -1;
and things started working as expected.

If this fix is correct, could it be rolled in the next version of NGUI?
Hope this helps somebody else :)

Thanks!
Title: Re: Bug in UICamera / ProcessFakeTouches
Post by: ArenMook on January 16, 2014, 11:32:44 PM
It's intentional. It simulates touch events using a mouse, so '1' implies 'first touch'. It shouldn't be using mouse IDs.