playMaker

Author Topic: HTC Vive HMD & Controller API  (Read 11370 times)

Terked

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
HTC Vive HMD & Controller API
« on: October 09, 2015, 12:27:37 AM »
Hey there,

I am currently developing for the HTC Vive and like to use playMaker to speed up my prototyping process. Are there any plans to add actions for the HTC Vive's controller and/or HMD for actions such as button presses and getting the current size of the pre-measured room your interact in?

Looking forward to hear from your answer!

Edit: The SDK is available here and API documentation there.
« Last Edit: October 09, 2015, 12:45:43 AM by Terked »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14052
  • Official Playmaker Support
    • View Profile
Re: HTC Vive HMD & Controller API
« Reply #1 on: October 14, 2015, 10:39:34 PM »
Hi,

 this is pure c++, and as is not compatible with Unity unless someone builds a dll out of this. and I am falling short of expertize on this.

 So the first step is to get someone to port steamVR for Unity, then we can study a PlayMaker support on top of this.

 Bye,

 Jean

ricard2798

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
Re: HTC Vive HMD & Controller API
« Reply #2 on: December 11, 2015, 09:17:17 AM »
Sometimes the solutions to our problems require us to come up with creative, yet inelegant solutions.  I started a demo yesterday for the vive, and like a few others, my coding skills are restricted to playmaker (I have seen some online in the same boat).
Well, since vive does not play nice with the unity input system... I jsut worked around it, by having the vive controllers change the values of global variables, and then use variable compare logic to initiate my event sequences :)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Re: HTC Vive HMD & Controller API
« Reply #3 on: December 11, 2015, 09:25:34 AM »
@Terked @ricard2798

My two cents..

You need to create a plug-in then you can create actions or call methods, function, etc.. like Jean said, create a dll..

here is a tutorial: http://www.alanzucconi.com/2015/10/11/how-to-write-native-plugins-for-unity/

The tutorial uses a C++ example and it seems quick + straight forward..

Good luck  8)
« Last Edit: December 11, 2015, 09:44:41 AM by dudebxl »

snake377

  • Playmaker Newbie
  • *
  • Posts: 10
    • View Profile
Re: HTC Vive HMD & Controller API
« Reply #4 on: December 16, 2015, 05:58:24 PM »
Are there any legitimate programmers in here that would be willing to undertake this task for the community and/or financial gain? If someone were to come up with and support some Vive-Playmaker Actions, I am sure they would do well on the Unity Asset store. I am certain there are some of us including myself that would pay good money to see this happen. I purchased and love Playmaker because it is a LIFE SAVER for people like me who take forever to code. Having to make a .dll is something outside of my skill set :(

MisterDeum

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Re: HTC Vive HMD & Controller API
« Reply #5 on: April 07, 2016, 06:44:56 AM »
Now that steam VR is out on the asset store, is there a way for someone at playmaker to bless us with actions for the vive ? I have a project entirely done with playmaker and porting it to vive seems impossible. I am not skilled at all for that. Thanks in advance.

fuzzywobs

  • Playmaker Newbie
  • *
  • Posts: 25
    • View Profile
Re: HTC Vive HMD & Controller API
« Reply #6 on: April 12, 2016, 01:56:06 PM »
I second this. I really really wish there were actions built in that offered some easy implementation like "if key down => Vive_Controller_1_Trigger" or something like that.

At the moment the solution I'm using is so hacky!

fantome2024

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
Re: HTC Vive HMD & Controller API
« Reply #7 on: April 14, 2016, 06:04:14 AM »
Same here you love for playmaker to help with this

pandachilli

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
Re: HTC Vive HMD & Controller API
« Reply #8 on: April 14, 2016, 08:56:48 AM »
Worth keeping an eye on this? https://t.co/iy7QO8npJS

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14052
  • Official Playmaker Support
    • View Profile
Re: HTC Vive HMD & Controller API
« Reply #9 on: April 19, 2016, 11:33:45 PM »
Hi,

 Unity seems to be working hard on a new Input System at last, so that would also definitly be a solution to look for in the near future.

Bye,

 Jean

fuzzywobs

  • Playmaker Newbie
  • *
  • Posts: 25
    • View Profile
Re: HTC Vive HMD & Controller API
« Reply #10 on: April 21, 2016, 04:11:33 AM »
I think that is the same solution I am using.

I have an FSM on the controller Getting the position of the trigger/buttons and storing it in a Global Variable.

That way you can do a float compare check in any other FSM and check if the value of the rotation/position of each button is above a certain threshold to see if it has been pressed.

Is this the simplest solution at the moment JeanFabre? Until Unity implements the input directly and we can use proper Playmaker actions to call them :)

Terked

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Re: HTC Vive HMD & Controller API
« Reply #11 on: April 28, 2016, 01:47:38 AM »
In times of need there will be a hero.

Coming in the form of a playmaker HTC Vive action plugin that came out today.

I tried it out already; works with both HTC Vive Pre and First Generation hardware.

sebaslive

  • Hero Member
  • *****
  • Posts: 557
    • View Profile
    • Frame Tale Studios
Re: HTC Vive HMD & Controller API
« Reply #12 on: April 28, 2016, 06:49:36 AM »
Looks like a good base but it seems to be missing a bit of noteworthy actions the API is capable of.

Note: I also don't own this so I was wondering if the creator is going to add more later on.
« Last Edit: April 28, 2016, 06:54:03 AM by sebaslive »
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

retox

  • Playmaker Newbie
  • *
  • Posts: 26
    • View Profile
Re: HTC Vive HMD & Controller API
« Reply #13 on: April 29, 2016, 06:53:27 AM »
I purchased the Steam VR tools to test out what functionality there is, however I get a load of errors after importing;

Code: [Select]
Assets/SteamVR_Playmaker/ChangeBodyModelController.cs(11,46): error CS0246: The type or namespace name `FsmStateAction' could not be found. Are you missing a using directive or an assembly reference?

Assets/SteamVR_Playmaker/ChangeModelController.cs(11,42): error CS0246: The type or namespace name `FsmStateAction' could not be found. Are you missing a using directive or an assembly reference?

Assets/SteamVR_Playmaker/ChangeTouchpadModelController.cs(11,50): error CS0246: The type or namespace name `FsmStateAction' could not be found. Are you missing a using directive or an assembly reference?

Assets/SteamVR_Playmaker/GetControllerPosition.cs(9,38): error CS0246: The type or namespace name `FsmStateAction' could not be found. Are you missing a using directive or an assembly reference?

Assets/SteamVR_Playmaker/GetControllerRotation.cs(11,38): error CS0246: The type or namespace name `FsmStateAction' could not be found. Are you missing a using directive or an assembly reference?

Assets/SteamVR_Playmaker/GetGrip.cs(11,24): error CS0246: The type or namespace name `FsmStateAction' could not be found. Are you missing a using directive or an assembly reference?

Assets/SteamVR_Playmaker/GetMenu.cs(11,24): error CS0246: The type or namespace name `FsmStateAction' could not be found. Are you missing a using directive or an assembly reference?

Assets/SteamVR_Playmaker/GetSystem.cs(11,26): error CS0246: The type or namespace name `FsmStateAction' could not be found. Are you missing a using directive or an assembly reference?

Assets/SteamVR_Playmaker/GetTouchpad.cs(11,28): error CS0246: The type or namespace name `FsmStateAction' could not be found. Are you missing a using directive or an assembly reference?

Assets/SteamVR_Playmaker/GetTrigger.cs(11,27): error CS0246: The type or namespace name `FsmStateAction' could not be found. Are you missing a using directive or an assembly reference?

Assets/SteamVR_Playmaker/Remove this or install Vectrosity/Drawing.cs(5,7): error CS0246: The type or namespace name `Vectrosity' could not be found. Are you missing a using directive or an assembly reference?


sebaslive

  • Hero Member
  • *****
  • Posts: 557
    • View Profile
    • Frame Tale Studios
Re: HTC Vive HMD & Controller API
« Reply #14 on: April 29, 2016, 07:20:45 AM »
If you ever get the error, type or namespace name 'FsmStateAction' could not be found. It either means Playmaker is not installed OR playmaker is broken.

It's basically trying to find playmaker.

I am also working on a more extensive list of actions for steamVR, which will include samples, like bow/arrow, boxing, shooting.
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