playMaker

Author Topic: Actions for the Oculus Touch? (solved, we got'em)  (Read 2614 times)

westingtyler

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Actions for the Oculus Touch? (solved, we got'em)
« on: August 13, 2016, 10:03:37 PM »
BAM: Solved. FrameTale Studios made an asset store kit that contains all the Oculus Touch playmaker actions we need. I was able to test them, and they work, and I'm implementing touch controls right now in my VR game. Get the pack on the asset store!

Here is their store page. I can attest that support and documentation is pretty good. https://www.assetstore.unity3d.com/en/#!/search/page=1/sortby=popularity/query=publisher:6138

Original post:
I am a dev with an Oculus Touch coming in the mail, and I am wondering if Playmaker has or even needs Oculus Touch support? As in, are there any new actions that need to be written to be able to use the Touch in Unity?

Here is the input documentation for Touch, but without Playmaker I would have no idea how to use it. https://developer3.oculus.com/documentation/game-engines/latest/concepts/unity-ovrinput/
« Last Edit: June 16, 2017, 10:06:17 AM by westingtyler »

Kazy

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Re: Actions for the Oculus Touch?
« Reply #1 on: September 16, 2016, 12:21:34 AM »
Seconded. The Vive has nice actions that expose the status of the controllers, but the Touch doesn't.

Nodixal

  • Playmaker Newbie
  • *
  • Posts: 16
    • View Profile
Re: Actions for the Oculus Touch?
« Reply #2 on: November 04, 2016, 10:21:51 AM »
Would love this as well! Released a game for the vive using the playmaker vive actions. Touch are coming soon and wanted to port the game to it.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Actions for the Oculus Touch?
« Reply #3 on: December 01, 2016, 12:23:37 AM »
Hi,

 yes, basically I don't own an Oculus Touch so I can't really port this without great risks of doing actions that do not work at all... :)

Maybe someone from the community would be ready to tackle?

there is a task on trello for this: https://trello.com/c/hEJlmimx/4-oculus-rift

Maybe U Prashanth has some of the actions done already?

Bye,

 Jean

sebaslive

  • Hero Member
  • *****
  • Posts: 539
    • View Profile
    • Frame Tale Studios
Re: Actions for the Oculus Touch?
« Reply #4 on: December 14, 2016, 11:50:02 AM »
Doesn't seem like oculus needs actions. From what I can tell, everything uses the input manager as opposed to the Vive.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

westingtyler

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Re: Actions for the Oculus Touch?
« Reply #5 on: February 19, 2017, 05:56:49 PM »
If Touch uses the Input Manager, can you tell me what button to use for the Oculus Touch button down and button up and thumbstick axes? I've tried sifting through dev docs but can't make heads or tails of this. I just need to know how to set up the touch axes/buttons in the input manager, then I can make my world-changing game.

https://developer3.oculus.com/documentation/game-engines/latest/concepts/unity-ovrinput/

that's all the info, i THINK, but as a non coder, I would not know how to make actions myself.

My input manager shows entries for Oculus Gear VR Thumbsticks, etc. Can anyone confirm there should be MORE inputs, or are these the ones to use?
« Last Edit: February 19, 2017, 06:34:48 PM by westingtyler »

Mulbin

  • Junior Playmaker
  • **
  • Posts: 80
    • View Profile
Re: Actions for the Oculus Touch?
« Reply #6 on: February 22, 2017, 03:26:15 AM »
The touch does use the input manager... but for some reason GetButtonDown in playmaker completely ignores button presses from the touch.

westingtyler

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Re: Actions for the Oculus Touch?
« Reply #7 on: February 27, 2017, 10:31:02 PM »
Mulbin, can you tell me what the "button names" are for the Oculus Touch, or post a screenshot of their entries into the Input Manager?

what are you choosing in the "Get Button Down" action?

Mulbin

  • Junior Playmaker
  • **
  • Posts: 80
    • View Profile
Re: Actions for the Oculus Touch?
« Reply #8 on: March 01, 2017, 03:03:12 AM »
It's all detailed here... but a bit beyond my understanding.

https://developer3.oculus.com/documentation/game-engines/0.8/concepts/unity-ovrinput/

I'm wondering if the function GetButtonDown just doesnt work with an Oculus Touch as the buttons work differently to normal controllers, they each have 2 or 3 states as they can be pressed, gently touched or proximity sensed.

Mulbin

  • Junior Playmaker
  • **
  • Posts: 80
    • View Profile
Re: Actions for the Oculus Touch?
« Reply #9 on: March 01, 2017, 03:39:57 AM »
After looking at a couple of scripts it looks like "Getbuttondown" just isn't how you use oculus controllers.

The scripts all seem to use something called OVRInput.GetDown

As I'm not a coder, I don't really know how to procedd from there.

tcmeric

  • Sr. Member
  • ****
  • Posts: 480
    • View Profile
Re: Actions for the Oculus Touch?
« Reply #10 on: March 07, 2017, 11:50:28 PM »
Checkout VRTK. It supports Oculus SDK.

https://vrtoolkit.readme.io/docs
(see list of SDKs).

I may be able to provide some basic playmaker actions for controller input. I have created them for Vive for VRTK. But I can only do so via VRTK, so you would need to have that.

I cannot test them as I don't have Oculus, but that should easy enough for you to do.
« Last Edit: March 07, 2017, 11:52:15 PM by tcmeric »

Mulbin

  • Junior Playmaker
  • **
  • Posts: 80
    • View Profile
Re: Actions for the Oculus Touch?
« Reply #11 on: March 11, 2017, 04:42:02 AM »
I've managed to write a script that uses OVRGetInput and activates empty game objects when buttons are pressed. Then I just use playmaker to get the sate of the game objects to detect if buttons are pressed.

It's clunky, but will do for now.

tcmeric

  • Sr. Member
  • ****
  • Posts: 480
    • View Profile
Re: Actions for the Oculus Touch?
« Reply #12 on: March 13, 2017, 10:20:55 AM »
Nice. I am glad it is working out for you  8)

westingtyler

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Re: Actions for the Oculus Touch?
« Reply #13 on: April 02, 2017, 11:24:53 PM »
mulbin, any chance of making that object activation touch script public? I still desperately need touch support for my vr playmaker game. currently it uses mouse and keyboard, but mouse pick translates wrongly since unity 5.0, so it's totally messed up. https://www.youtube.com/watch?v=_rNf0RBy48k

Mulbin

  • Junior Playmaker
  • **
  • Posts: 80
    • View Profile
Re: Actions for the Oculus Touch?
« Reply #14 on: April 15, 2017, 02:42:30 AM »
Hi, sorry missed your reply!  Here you go, just drop this on an empty game.  You then create more empty objects (set them as disabled) and drag them into the fields this script creates.  When you press or release the buttons the game objects will activate/deactivate giving you something easy for playmaker to see.

Code: [Select]
using UnityEngine;
using System.Collections;

public class TouchController: MonoBehaviour {

// Use this for initialization
void Start () {

}
    public GameObject RightIndexTrigger;
    public GameObject LeftIndexTrigger;
    public GameObject LeftHandTrigger;
    public GameObject RightHandTrigger;
    public GameObject AButton;
    public GameObject YButton;

    // Update is called once per frame
    void Update ()
    {
        if (OVRInput.Get(OVRInput.RawButton.RIndexTrigger))
        {
            RightIndexTrigger.SetActive(true);
        }
        else
        {
            RightIndexTrigger.SetActive(false);
        }
   
        if (OVRInput.Get(OVRInput.RawButton.LIndexTrigger))
        {
            LeftIndexTrigger.SetActive(true);
        }
        else
        {
            LeftIndexTrigger.SetActive(false);
        }

        if (OVRInput.Get(OVRInput.RawButton.RHandTrigger))
        {
            RightHandTrigger.SetActive(true);
        }
        else
        {
            RightHandTrigger.SetActive(false);
        }
        if (OVRInput.Get(OVRInput.RawButton.A))
        {
            AButton.SetActive(true);
        }
        else
        {
            AButton.SetActive(false);
        }
        if (OVRInput.Get(OVRInput.RawButton.Y))
        {
            YButton.SetActive(true);
        }
        else
        {
            YButton.SetActive(false);
        }
    }
}