Author Topic: Input Events on VR  (Read 8285 times)

alexv

  • Newbie
  • *
  • Thank You
  • -Given: 10
  • -Receive: 1
  • Posts: 22
    • View Profile
Input Events on VR
« on: June 01, 2016, 01:05:15 PM »
Hi there,

I'm using NGUI on a Gear VR app with "3D World" Event Type, and was wondering if I could use the VR Camera to trigger OnHover and all other built-in ngui events.

I understand NGUI uses Input.MousePosition to check for events like Hover, but I'd like to use a fixed "center" position from vr camera instead.

there is a MousePosition provided by Gear VR , but it's used for the touchpad on the side, which does not behave like a mouse cursor at all, and I don't want to trust its values, since they don't necesary match the center of screen all the times.

any insights on this?
thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Input Events on VR
« Reply #1 on: June 01, 2016, 10:17:30 PM »
Yes, it's possible in NGUI 3.9.9 that's in the Pro repository right now. You can set UICamera.GetMouse / UICamera.GetTouch delegates, which by default just use Input. You can change them to be something else.

alexv

  • Newbie
  • *
  • Thank You
  • -Given: 10
  • -Receive: 1
  • Posts: 22
    • View Profile
Re: Input Events on VR
« Reply #2 on: June 01, 2016, 10:29:51 PM »
Yes, it's possible in NGUI 3.9.9 that's in the Pro repository right now. You can set UICamera.GetMouse / UICamera.GetTouch delegates, which by default just use Input. You can change them to be something else.

thanks for the info, I have a standard NGUI license (version 3.9.8 is the latest in there) any idea when will 3.9.9 be rolled to standard licensed people?

thanks !

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Input Events on VR
« Reply #3 on: June 04, 2016, 02:12:27 PM »
I'll see about doing it this weekend (tonight or tomorrow).

alexv

  • Newbie
  • *
  • Thank You
  • -Given: 10
  • -Receive: 1
  • Posts: 22
    • View Profile
Re: Input Events on VR
« Reply #4 on: June 05, 2016, 12:22:38 AM »
I'll see about doing it this weekend (tonight or tomorrow).

you're da man!  8)

thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Input Events on VR
« Reply #5 on: June 06, 2016, 10:01:55 PM »
Update got held up, I got side-tracked by adding dragons to Windward. You can just toss me an email to support [at] tasharen.com and request an early unity package if you like.