playMaker

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 - HendrikB

Pages: [1] 2 3
1
Share New Actions / Re: Oculus Go and Gear VR Controller Actions
« on: January 28, 2019, 06:34:52 AM »
Hi Oculus Go / Gear VR & Playmaker fans :)

Ok I have posted an update right at the beginning of this post (page 1, first post), with all the Oculus Go / Gear VR actions I have created.

I split the OculusGoButtonDown.cs (previously known as GetVRButtonDown.cs) into lots of smaller actions to make FSM state coding more manageable.

I hope these actions help you to make awesome games. Combined with Playmaker, its so easy to make games for Oculus Go :)

Here is the link to all my latest Oculus Go / Gear VR actions:

https://github.com/HendrikZA/general-playmaker/tree/master/oculus%20go%20and%20gear%20vr

2
Share New Actions / Re: Oculus Go and Gear VR Controller Actions
« on: January 25, 2019, 03:42:29 PM »
Hi folks,

Here's another action for Oculus Go. This one's job is simple:

  • Check if controller rotated left or right with enough acceleration then send event (useful for switching weapons, and brilliant for doing a quick turn in an FPS game. So if the player rotated the controller to the right with a bit more force / acceleration than normal, then send an event. You'll see a similar type of thing in games like Slightly Heroes for quick turns)
  • Check if controller is pointing straight up or straight down (useful for reload actions, like when the player brings the controller up towards the chest to reload, or points down like in many FPS games you see for mobile VR such as Drop Dead)

Again just a simple little action but I'm sure it will be useful to you. I've added sensitivity settings that you can use to tweak a bit as needed.

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

I will update the Readme file on my Github soon to account for all the extra actions I've been adding. Also I will rename all the actions soon so it makes more sense what each does, so please excuse the naming for now :)

Cheers!
Hendrik

3
Share New Actions / Re: Oculus Go and Gear VR Controller Actions
« on: January 24, 2019, 03:35:02 PM »
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.

No problem :)

I've also updated the rotation and position script. I created a new and improved script that captures all the controller's "physics", which is the easiest way I can describe it. So I am getting its position, velocity, rotation, angular rotation, angular velocity and so on. This is super useful for anyone trying to create throwing actions, or even to calculate how much force was used in a sword slash for damage to an enemy, or just a simple fishing rod throw or grenade throw.

I've added it here on my Github account for everyone to use. Hope it helps :)

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

Cheers,
Hendrik

4
Share New Actions / Re: Oculus Go and Gear VR Controller Actions
« on: January 13, 2019, 12: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 :)

5
Share New Actions / Re: Oculus Go and Gear VR Controller Actions
« on: January 13, 2019, 11:46:10 AM »
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

6
Share New Actions / Re: Oculus Go and Gear VR Controller Actions
« on: January 12, 2019, 05: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.

7
Share New Actions / Re: Oculus Go and Gear VR Controller Actions
« on: January 11, 2019, 01: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 :)

8
Share New Actions / Re: Oculus Go and Gear VR Controller Actions
« on: January 11, 2019, 12: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

9
Share New Actions / Re: Oculus Go and Gear VR Controller Actions
« on: January 11, 2019, 11:59:49 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

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

10
Share New Actions / Re: Oculus Go and Gear VR Controller Actions
« on: January 09, 2019, 05: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.

11
Share New Actions / Re: Oculus Go and Gear VR Controller Actions
« on: January 06, 2019, 03:57:19 PM »
Hi Hendrik.

It worked perfectly. :) :)
Thank you.

Nice dude :)

12
Share New Actions / Re: Oculus Go and Gear VR Controller Actions
« on: January 04, 2019, 11:52:40 AM »
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 :)

13
Share New Actions / Re: Oculus Go and Gear VR Controller Actions
« on: January 04, 2019, 06: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.

14
Share New Actions / Re: Oculus Go and Gear VR Controller Actions
« on: January 04, 2019, 06:14:17 AM »
Hi Hendrik.
I am working in an Oculus Go / Gear VR project using your plugin and is really good.
I just submitted to the store and they ask me to position the controller following the hand setup (left or right hand).
Is it possible to make an action that gives the hand choice? Maybe a bool variable that is true when is in the right-hand mode.
Thank you for your great work. :)

Hey edufurla,

No problem, glad it has helped you :)

Sure, I'm writing a custom action for you right now that will check:

Left-handed controller detected
Right-handed controller detected
HMD only detected

For each you can choose to either save it as a bool to use as you wish, or you can also fire off an event, or both, depending on your needs. I'll upload it to Github later and paste the link here for everyone to use.

15
Share New Actions / Re: Oculus Go and Gear VR Controller Actions
« on: January 04, 2019, 12:20:16 AM »
If anyone prefers to have smaller actions instead of one large one, please let me know and I can split up the different sections of my current OculusGoButtonDown action into smaller actions.

If you are using the action for a game where you are interacting with objects in the scene using a reticle / laser pointer, and let's say you have a objects in the scene using this OculusGoButtonDown action, then of course, all of the events will fire if you press trigger, dpad or whatever. So a good tip for that is, use a global Playmaker variable that is set when your reticle / laser pointer highlights or hovers over a specific object (using object name or tag), and then let the object compare it's own name or tag to that global variable to let it decide if it should take an action or not when an event fires.

For example, let's say you have a door in the scene, and somewhere else in the scene you might have a light switch. These are two separate objects with their own FSMs potentially. There are a lot of ways to interact with these, but one method could be to have the OculusGoButtonDown action on each, both listening for the Trigger event to fire.

You could easily set up an FSM on your reticle in the scene to get the name or tag of the object you are hovering over, then set a global Playmaker variable called currentHoveredObject, then in each FSM for the door and light switch, when Trigger fires, simply compare the object's own name or tag to the global variable.

It's just one way to do it, and there are lots of different ways, but it's just an example that might help you if you are starting out with your first Gear VR or Oculus Go Playmaker project. You could also just have a separate empty game object in your scene, for example GM_Controller, then add an FSM to it to control all input related actions (so you just use one OculusGoButtonDown action), and do a bunch of comparisons to see what kind of object is being interacted with, and send a global event to that object when trigger is pressed etc. That is better for larger projects when you want to interact with prefabs and so on.

I hope it helps :) Feel free to PM if you have questions, I'll try my best to help. I can also write custom actions for Oculus Go / Gear VR, so let me know if there is anything specific that you would like me to create.

I'm currently working on two Oculus Go / Gear VR projects, both using my OculusGoButtonDown action, and so far, it is working perfectly. Of course it is also simple to integrate it with any other plugins on the asset store because all my action uses is the standard OVRInput API from Oculus, so it works out the box, assuming you have imported Oculus Utilities for Unity, which you should :)

Pages: [1] 2 3