playMaker

Author Topic: Oculus Go and Gear VR Controller Actions  (Read 18518 times)

HendrikB

  • Playmaker Newbie
  • *
  • Posts: 37
  • In love with Playmaker
Re: Oculus Go and Gear VR Controller Actions
« Reply #15 on: January 04, 2019, 08:54:33 AM »
Hi edufurla, I've written the custom action for you and it should work right out the box. I have not been able to test it as yet, but will do so in a few hours as I am currently out for the day.

Give it a test and let me know if any issues, here is the link: https://raw.githubusercontent.com/HendrikZA/general-playmaker/master/oculus%20go%20and%20gear%20vr/OculusGoInputSource.cs

It should appear in the Input category in your Action Browser, once you've added the script to your project.
« Last Edit: January 28, 2019, 08:28:41 AM by HendrikB »

edufurla

  • Junior Playmaker
  • **
  • Posts: 56
Re: Oculus Go and Gear VR Controller Actions
« Reply #16 on: January 04, 2019, 10:45:48 AM »
Awesome! :D :D
Thank you. I will wait for your post.
Thank you

HendrikB

  • Playmaker Newbie
  • *
  • Posts: 37
  • In love with Playmaker
Re: Oculus Go and Gear VR Controller Actions
« Reply #17 on: January 04, 2019, 01:52:40 PM »
Hey edufurla,

Yup it all works I just tested it :) The action can detect if controller is left or right, and also if no controllers are detected, it shows that HMD only is true, so one can assume it is a Gear VR without controllers for example.

Give it a go and hopefully Oculus will accept your published game, I wish you best of luck with your submission to Oculus :)

edufurla

  • Junior Playmaker
  • **
  • Posts: 56
Re: Oculus Go and Gear VR Controller Actions
« Reply #18 on: January 06, 2019, 04:31:31 AM »
Hi Hendrik.

It worked perfectly. :) :)
Thank you.

HendrikB

  • Playmaker Newbie
  • *
  • Posts: 37
  • In love with Playmaker
Re: Oculus Go and Gear VR Controller Actions
« Reply #19 on: January 06, 2019, 05:57:19 PM »
Hi Hendrik.

It worked perfectly. :) :)
Thank you.

Nice dude :)

WayneAdams

  • Playmaker Newbie
  • *
  • Posts: 17
    • Glacier Studios
Re: Oculus Go and Gear VR Controller Actions
« Reply #20 on: January 09, 2019, 05:06:19 PM »
Awesome to see you working on this. Thanks so much!

HendrikB

  • Playmaker Newbie
  • *
  • Posts: 37
  • In love with Playmaker
Re: Oculus Go and Gear VR Controller Actions
« Reply #21 on: January 09, 2019, 07:02:18 PM »
Awesome to see you working on this. Thanks so much!

It's a pleasure Wayne :) I'm using these actions I created in my own projects I'm working on and they have made life much easier!

If I find any new or interesting things I can make actions for Gear VR / Oculus Go, I'll add those too. I'll build some actions as well for Oculus Quest closer to its launch. I think those use the standard Rift touch controller inputs so they should be relatively easy to make.

edufurla

  • Junior Playmaker
  • **
  • Posts: 56
Re: Oculus Go and Gear VR Controller Actions
« Reply #22 on: January 11, 2019, 10:42:11 AM »
Hi Hendrik.
Is it possible to make an action getting the sensor info from the Oculus Go or Gear VR? To know when someone removed the headset.
Thank you

HendrikB

  • Playmaker Newbie
  • *
  • Posts: 37
  • In love with Playmaker
Re: Oculus Go and Gear VR Controller Actions
« Reply #23 on: January 11, 2019, 01:59:49 PM »
Hi Hendrik.
Is it possible to make an action getting the sensor info from the Oculus Go or Gear VR? To know when someone removed the headset.
Thank you

Hey edufurla,

Sure no problem, I'll write this now and add to Github. Will let you know when it is available. Will make it so that:

Send event if headset removed
Send event if headset is back on user face
Store bool - true if headset removed

So you will be able to use the events, or just store the bool to use for your own FSMs.

Will have it available in next hour :)

Cheers,
Hendrik

HendrikB

  • Playmaker Newbie
  • *
  • Posts: 37
  • In love with Playmaker
Re: Oculus Go and Gear VR Controller Actions
« Reply #24 on: January 11, 2019, 02:53:17 PM »
Ok I've added an action for Gear VR and Oculus Go to check if the headset has been removed and when it is put back on.

Here is the action:

https://raw.githubusercontent.com/HendrikZA/general-playmaker/master/oculus%20go%20and%20gear%20vr/OculusGoHeadsetStatus.cs

I'll test it some time this weekend but it should work just fine :)

Cheers!
Hendrik
« Last Edit: January 28, 2019, 08:29:21 AM by HendrikB »

HendrikB

  • Playmaker Newbie
  • *
  • Posts: 37
  • In love with Playmaker
Re: Oculus Go and Gear VR Controller Actions
« Reply #25 on: January 11, 2019, 03:08:04 PM »
Ok I've added an action for Gear VR and Oculus Go to check if the headset has been removed and when it is put back on.

Here is the action:

https://raw.githubusercontent.com/HendrikZA/general-playmaker/master/oculus%20go%20and%20gear%20vr/GetHeadsetStatus.cs

I'll test it some time this weekend but it should work just fine :)

Cheers!
Hendrik

Hmm seems it has a compiler error in Unity. I'll investigate, test and re-upload. Will let you know :)

HendrikB

  • Playmaker Newbie
  • *
  • Posts: 37
  • In love with Playmaker
Re: Oculus Go and Gear VR Controller Actions
« Reply #26 on: January 12, 2019, 07:12:03 AM »
Hi edufurla, I'm working on this and testing it today. Encountering some small issues with this particular one, but it will be ready soon.

Also, I'm going to break down the larger OculusGoButtonDown.cs action into smaller pieces. The larger one will still be available for folks who prefer the larger action with everything on it, but I also understand that it takes up a lot of space in the Action Browser when "Preview" is enabled. So I'll have for example button presses in a separate action and the capacitive touch in a separate action just to begin with, which will make it much shorter.

I'm also experimenting with a controller rotation and positioning action, which although might not be that useful since most Gameobjects can just be parented to the right/left hand on the OVRCamera, it might still prove useful in some situations depending on your needs. Good to have it rather than not.

Will update later today or at the very latest tomorrow with this Headset off / on face action.
« Last Edit: January 28, 2019, 08:29:48 AM by HendrikB »

HendrikB

  • Playmaker Newbie
  • *
  • Posts: 37
  • In love with Playmaker
Re: Oculus Go and Gear VR Controller Actions
« Reply #27 on: January 13, 2019, 01:46:10 PM »
Ok here is a new action to check if the Headset is on or off the face. You can send an event, or simply store the bool value to use for your own purposes :)

https://raw.githubusercontent.com/HendrikZA/general-playmaker/master/oculus%20go%20and%20gear%20vr/OculusGoHeadsetStatus.cs
« Last Edit: January 28, 2019, 08:30:06 AM by HendrikB »

HendrikB

  • Playmaker Newbie
  • *
  • Posts: 37
  • In love with Playmaker
Re: Oculus Go and Gear VR Controller Actions
« Reply #28 on: January 13, 2019, 02:40:04 PM »
I've also added a small action that just gets the controller rotation and position on every update. You can play around with it to see if it can be useful for you. I would imagine that you can use it to do stuff like door handle turning, controlling guns in the scene, etc.

I have played with it a bit and it works well. I'd recommend using debug or setting a text value every frame with the rotation and/or position of the controller to see how the rotations change to see which angles would indicate pointing left, right, up, down etc.

https://raw.githubusercontent.com/HendrikZA/general-playmaker/master/oculus%20go%20and%20gear%20vr/OculusGoPhysics.cs

I was thinking to use it for a reload action, when player pulls remote up towards their body, pointing upward. But there's an easier way to do that. You just add a cube above the player's head, mesh turned off, and collider set to trigger. Then if you are using a raycast with a controller's laser pointer, you can check if it hit the cube above the head, and hook up a global event to that in an FSM. I just did that a little while ago and was able to trigger a reload event each time without any issues when the controller was pulled up towards the head.

Anyways, happy developing folks :)
« Last Edit: January 28, 2019, 08:30:26 AM by HendrikB »

edufurla

  • Junior Playmaker
  • **
  • Posts: 56
Re: Oculus Go and Gear VR Controller Actions
« Reply #29 on: January 14, 2019, 07:49:46 AM »
Hi Hendrik, - that was fast! :D
Thank you very much.
I will give a try with the new rotation action too. I have no projects to use it right now but can be very handy in the future.