Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: PET on October 26, 2016, 02:43:17 AM

Title: Playmaker & GearVR (Raycast & Keypress)
Post by: PET on October 26, 2016, 02:43:17 AM
Hey guys,

I have some problems with an app for GearVR.

1. On the PC build & the Editor the Raycast works perfectly. I look at the trigger, it triggers. On the GearVR ... it behaves strangely. I can't pinpoint the problem exactly because I can't test it myself, but it seems that it's hard to trigger the triggers. I was able to test this on the Occulus on the PC build and it was actually impossible to trigger some triggers.

Any idea what to do?
Maybe this is related?
https://forum.unity3d.com/threads/physics-raycaster-does-not-work-when-vr-is-enabled.393564/

Quote
We've made some changes internally to the Camera viewport rects to fix viewport issues in VR. With this change, the Screen.width and height no longer represent the resolution of the HMD. Screen represents the game view and the HMD resolution is now represented by VRSettings.eyeTextureWidth and VRSettings.eyeTextureHeight. So if you raycast using the Game View's width and height, the ray will be incorrect for VR cameras unless your Game view resolution is the same as the HMD.

You just need to update the GazeInputModule script to use the HMD resolution rather than the Screen resolution.

2. I want to press one of the buttons from GearVR. There is a back button & a Dpad. Any idea how to trigger those buttons?

Thank You

<3
Title: Re: Playmaker & GearVR (Raycast & Keypress)
Post by: 600 on October 26, 2016, 07:56:34 AM
Hi,
not sure about raycast, did you check the sample from Jean (on Ecosystem)?

For swipe controls are Actions Mouse X and Mouse Y,
Back button is Escape key input and the middle confirm is Mouse 0 (Left Mouse input).
Title: Re: Playmaker & GearVR (Raycast & Keypress)
Post by: PET on October 26, 2016, 08:21:29 AM
Thanks for the reply. I checked the Ecosystem... but dunno exactly what I need.

I will map ESC to my state. thanks
Title: Re: Playmaker & GearVR (Raycast & Keypress)
Post by: 600 on October 26, 2016, 08:59:08 AM
Found that sample, maybe helps:
http://hutonggames.com/playmakerforum/index.php?topic=13306.msg61926#msg61926
Title: Re: Playmaker & GearVR (Raycast & Keypress)
Post by: PET on October 26, 2016, 09:02:02 AM
Yea... I found that to... but it's more of a "gaze". Like you have a button, and if you "gazed" over that button for X seconds it will count as an input.

I will take it to see what it can do. in theory it should have a proper raycast because... you need to see the button :D