Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - CaptainCrunch80

Pages: [1]
1
Thanks a lot ArenMook,

with your hint to UICamera.onCustomInput I managed to do this.

It involves
  • Raycasting from the right eye camera
  • if hit is a plane with a gui texture get hit texture coords
  • raycast into gui camera view with gui coords to camera pixel size
  • send OnHover, OnClick etc. to the hit gui object

Works like a charm, but it is very late and I need to go to bed. So I post my solution this weekend after cleaning up and making some further tests.

*****

2
Hi,

I am trying to use the Oculus Rift with NGUI. It looks great and I think I can handle most situations already, because I followed this
guide that helped me a lot setting up NGUI to work in a VR environment http://www.beowulf99.com/blog/?p=1014

But one problem is remaining. I want to hover and then 3 seconds later click buttons just by looking at them.

Please take a look at the provided picture, this is just an example.

So what I do is raycasting from the center of the right camera  in look direction and try to hit the button. Of course I hit the textured plane  ... but not the button.

I would have given up already, but no matter in what angle I look at the plane with the NGUI gui texture, when I mouse over the button it is clickable and reacts to hover.

So I believe there is some kind of weird magic at work to click the button that is rendered to a texture and shown on that plane.

I looked at a lot of code in UICamera and so on, but I can not find what makes this work and re-engineer it for my look at button plan.

Do you have a clue?! Anybody?  :o

Pages: [1]