Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: tcmeric on February 20, 2017, 10:08:01 PM

Title: VRTK Actions
Post by: tcmeric on February 20, 2017, 10:08:01 PM
I have started creating actions for VRTK. It is a bit of a challenge for me at my skill level, but i am working away at it. Also, VRTK changes pretty fast (on their github). The current store asset version is 3.0.1, and the current github version have some pretty significant changes. The github version will be pushed to the asset store fairly soon Ive been told. So I have now started working on the github version instead of the asset store version.

I have been in touch with the VRTK creator, theStoneFox, and they are pretty hands-off, as they are not familiar with playmaker. Therefore I hope this forum doesn't mind me bothering you all sometimes for custom action help as I come across new problems. Thanks to MdotStrange for getting me started with his template for custom actions.

All that being said, actions are free to download from my github account here: https://github.com/dumbgamedev/

My plan is to work first on pointers, then teleporters/locomotion, followed by input methods. We will see how that goes.

It is a HUGE toolkit, so there potentially could be a TON of actions from it. It likely will change again before I even get to the end. So if people have requests, better post them here, so I can bump them up on my to-do list.
Title: Re: VRTK Actions
Post by: fletcherkildren on February 21, 2017, 02:04:49 PM
You are a freakin' godsend. I've been struggling with VRTK and Playmaker and this will be incredibly helpful! I wish I could help with this - was also considering making a Playmaker (or visual scripting) channel in the VRTK Slack.
Title: Re: VRTK Actions
Post by: tcmeric on February 21, 2017, 07:50:26 PM
Is there anything in particular that you need? Are you using the latest github version?

Anyways, it will take awhile to get through it, but little by little.  8)
Title: Re: VRTK Actions
Post by: tcmeric on February 24, 2017, 04:17:00 AM
So, I have officially added all the input buttons for VRTK. You can now get trigger clicks (or presses), grip clicks, etc from the controllers via VRTK. They come as bools, so you just need to do a simple bool check. (Ie, is the trigger clicked or not).

As well I have

locomotion:
basic teleport
dashteleport
heightadjust teleport
Move in place

Pointers:
Straight pointers

Scripts
BodyPhysics (necessary for move in place)
Title: Re: VRTK Actions
Post by: tcmeric on March 06, 2017, 06:35:34 AM
Some new actions added:

TouchPad Axis (see our tutorial on how to make a third person controller using one or two touchpads):
Get Controller Active (check to see if controllers are on, reminder users to turn them on!)

Haptic Rumble
Haptic Rumble Advanced. (Setup haptic rumble for duration, pulse and strength)

All Controller button Inputs (use any button on a vive controller in playmaker. See our tutorial on setting up a menu button:
GetInteractableObjectStatus (see if an an object is being held and set your next state!)

... More...
Title: Re: VRTK Actions
Post by: tcmeric on March 06, 2017, 09:38:09 AM
More actions for today

Title: Re: VRTK Actions
Post by: LordHorusNL on March 06, 2017, 12:44:29 PM
Great work on these actions, very much appreciated!

Playmaker and VRTK don't get along that well yet, so this will definitely help.
Title: Re: VRTK Actions
Post by: tcmeric on March 06, 2017, 10:20:11 PM
New actions for today


LordHorusNL, no problem. Let me know if you need any actions in specific.
Title: Re: VRTK Actions
Post by: LordHorusNL on March 07, 2017, 06:16:19 PM
I'd like to make a request.

please add actions that allows me to get which controller is "grabbing" an VRTK_InteractableObject! The same would also be great for touch and use.

I know i can get this using Call Method, but still.

Oh and actions to set the allowed controllers for grab/use/touch would be great also. Getting the controller as a gameobject and setting it.

Thanks

Title: Re: VRTK Actions
Post by: tcmeric on March 07, 2017, 09:48:43 PM
Here is GetUsedObjectsGameobject
Title: Re: VRTK Actions
Post by: tcmeric on March 07, 2017, 09:49:20 PM
Here is GetGrabbedObjectsGameobject
Title: Re: VRTK Actions
Post by: tcmeric on March 07, 2017, 09:50:28 PM
Regarding touched, I will have to look into it more. The method returns a list. I have been trying to store that in a gameobject array in playmaker, but so far no luck. I am sure it will get worked out at somepoint.
Title: Re: VRTK Actions
Post by: tcmeric on March 07, 2017, 11:07:14 PM
Added 4 more playmaker actions, which should cover most of the InteractableObject script settings.

That includes whether setting which, either or no controllers can interact with that object.

SetInteractableObjectGrabOptions
SetInteractableObjectTouchOptions
SetInteractableObjectUseOptions
SetInteractableObjectWhenIdle

It has all been added to the github account. Just download and replace your current vrtk playmaker actions.

https://github.com/dumbgamedev/VRTK_Playmaker3x
Title: Re: VRTK Actions
Post by: LordHorusNL on March 08, 2017, 10:37:10 AM
Works great, thanks a lot.

Using SetInteractableObjectGrabOptions did reveal a bug in VRTK so i brought it to the attention of TheStoneFox.

Title: Re: VRTK Actions
Post by: Falibu on March 10, 2017, 10:26:33 AM
wow this is awesome to see your road map! thanks!
Title: Re: VRTK Actions
Post by: Groo Gadgets on April 14, 2017, 04:35:08 PM
Heya,

Only just discovered this thread! Well done and keep up the good work! I will start to have a play with these next week when I get back onto my current project.
Title: Re: VRTK Actions
Post by: tcmeric on April 15, 2017, 01:58:14 AM
Totally. I havent targeted google myself, as I only have a Vive, but let me know how it goes. Also join us at our playmaker slack channel (there is a bunch of us that do VR with playmaker there): https://invite-playmaker-slack.herokuapp.com/
Title: Re: VRTK Actions
Post by: tcmeric on April 23, 2017, 11:58:00 PM
Another update to this thread. Ill try and keep it all in one place from now on, so its easier to find.

Tutorial: VRTK (Vive VR) using Levers with Playmaker in Unity :
In this tutorial we look at levers and how to get the lever values into playmaker using our custom action (free). In this example we make a switch that turns off and on to activate a light and set an on/off bool, when we move the lever up and down in VR. You could extend this to play sounds, give force feedback and more.

Download VRTK playmaker actions here: https://github.com/dumbgamedev/VRTK_Playmaker3x
Join us on slack for chat: https://invite-playmaker-slack.herokuapp.com

Liked this tutorial and free playmaker action? Support me on Pateron for more: http://patreon.com/playmaker
Title: Re: VRTK Actions
Post by: tcmeric on April 27, 2017, 04:56:29 AM
Snap zone actions have been added.

(Gets the gameobject leaving or entering the snap zones.)
ObjectEnteredSnapDropZone.cs
ObjectExitedSnapDropZone.cs
ObjectSnappedToSnapDropZone.cs
ObjectUnsnappedToSnapDropZone.cs


(Sets snap zone properties)
SetSnapDropZoneHighlight.cs   
SetSnapDropZoneHighlightActive.cs   
SetSnapDropZoneObjectOutline.cs   
SetSnapDropZoneScaling.cs   
SetSnapDropZoneSnapDuration.cs   
SetSnapDropZoneSnapType.cs
SetSnapDropZoneValidObjectList.cs

These work with the example scene in VRTK 041_Controller_ObjectSnappingToDropZones
Title: Re: VRTK Actions
Post by: tcmeric on April 27, 2017, 04:58:06 AM
Another update, all the actions have been separated into various VRTK action categories for better management, as this list of actions have been getting long. Ie, they are now in VRTK Locomotion, VRTK Interaction, VRTK Controller in the playmaker action browser., etc. This should not be a breaking update (but always backup first if you are concerned).
Title: Re: VRTK Actions
Post by: beowulfkaine on April 27, 2017, 08:15:39 AM
I'm getting a

"Assets/VRTK_Playmaker3x/TriggerEvents/GetPointerUseObject.cs(23,17): error CS0234: The type or namespace name `WhirlygigPlaymaker' does not exist in the namespace `VRTK.Examples'. Are you missing an assembly reference?
"
on the new build?
Title: Re: VRTK Actions
Post by: beowulfkaine on April 27, 2017, 08:24:05 AM
Snap zone actions have been added.

(Gets the gameobject leaving or entering the snap zones.)
ObjectEnteredSnapDropZone.cs
ObjectExitedSnapDropZone.cs
ObjectSnappedToSnapDropZone.cs
ObjectUnsnappedToSnapDropZone.cs


(Sets snap zone properties)
SetSnapDropZoneHighlight.cs   
SetSnapDropZoneHighlightActive.cs   
SetSnapDropZoneObjectOutline.cs   
SetSnapDropZoneScaling.cs   
SetSnapDropZoneSnapDuration.cs   
SetSnapDropZoneSnapType.cs
SetSnapDropZoneValidObjectList.cs

These work with the example scene in VRTK 041_Controller_ObjectSnappingToDropZones

I was wondering if there was a manual for how to use the drop zones or a video in the works?
Title: Re: VRTK Actions
Post by: tcmeric on April 27, 2017, 08:37:04 AM
Oops. I didnt mean to include that action yet. Its not ready as you can see.

You can delete this file safely. Assets/VRTK_Playmaker3x/TriggerEvents/GetPointerUseObject.cs

The VRTK people did not make any video or tutorial for that scene. I am sort of familiar on how to set it up. There are lots of variations of course. Its too bad they didnt make one. I plan on making a short one but havent had time yet. I would suggest playing with the demo scene and seeing how things are set up.
Title: Re: VRTK Actions
Post by: beowulfkaine on April 27, 2017, 08:41:07 AM
Oops. I didnt mean to include that action yet. Its not ready as you can see.

You can delete this file safely. Assets/VRTK_Playmaker3x/TriggerEvents/GetPointerUseObject.cs

The VRTK people did not make any video or tutorial for that scene. I am sort of familiar on how to set it up. There are lots of variations of course. Its too bad they didnt make one. I plan on making a short one but havent had time yet. I would suggest playing with the demo scene and seeing how things are set up.

Ok, well I have a few other things I can work on to give you time to make a video (if your making one  ;) ) I am also almost ready to give you a sample scene based on all the help you've given me, just to see the results of some of your assistance! (HTC-VIVE needed of course) Also made a post on your other topic about making a 20$ option for patreon?
Title: Re: VRTK Actions
Post by: tcmeric on April 27, 2017, 09:38:44 AM
You can also join us on our playmaker slack channel. There is a couple of active people in the channel who do playmaker + VRTK and are working on Vive projects. Its not a huge group but we chat almost daily. You can drop your samples in their if you would like some friendly feedback on things or share WIP videos, etc. https://invite-playmaker-slack.herokuapp.com

Cool, I will have a look at the test scene!
Title: Re: VRTK Actions
Post by: tcmeric on May 04, 2017, 05:10:14 AM
New actions have been added. Feedback if they are not working please and I will do my best to correct them.

They can be found in the VRTK playmaker project at github. These ones are specifically in the pointer folder here: https://github.com/dumbgamedev/VRTK_Playmaker3x/tree/master/Pointer

1. pointerDestinationInfo

Add the VRTK_DestinationMarker_UnityEvents script to your controller to make this action work. Then this action can get whatever your controller is pointing at with the pointer. (If you are missing the script on your controller, this action will prompt you to add it). Choose your VRTK controller as the "game object" in this action.

2. getControllerInt

Set the game object to your controller (same as always). This action will return your controller index number.

3. activatePointer

this one can force turn on and off the pointer (using a bool). Requires the pointer script to be added to your controller.

4. getPointerStatus,

will check to see if the pointer is currently on or off. Same as above, needs the pointer script on the controller to work.
Title: Re: VRTK Actions
Post by: Doh on May 30, 2017, 12:12:21 PM
Hey Tcmeric,

I'm using your actions for VRTK, wonderfully useful!

I'm trying to do a check to see if a controller is currently grabbing an object. I see that you have a way of finding which controller is grabbing a specific object, though I want to find out if a controller is holding any object at all. Is this possible with your current actions or VRTK in general?
Title: Re: VRTK Actions
Post by: tcmeric on May 30, 2017, 07:30:21 PM
You can do a null check on the "get grabbed game object". If it is null, then nothing is being grabbed. Try the action "game object is null".
Title: Re: VRTK Actions
Post by: Doh on May 30, 2017, 07:47:50 PM
hmm I just re-downloaded your actions from your git today and I've not got a "get grabbed game object" action, only a "get grabbed objects gameobject". Have you released other actions separately?
Title: Re: VRTK Actions
Post by: tcmeric on May 30, 2017, 10:33:48 PM
That would be the action.
Title: Re: VRTK Actions
Post by: Doh on May 31, 2017, 03:34:24 AM
I am correct in thinking that the action checks what a specific interactable object is being grabbed by, aren't I?

Sadly that action is not practical in my case as I'd have to check every grabbable object in the game to be able to say with certainty that no object is being grabbed.

In my case I'm trying to ask a controller if it is grabbing anything, where as "get grabbed objects gameobject" asks an interactable object which object is grabbing it.
Title: Re: VRTK Actions
Post by: tcmeric on May 31, 2017, 03:59:01 AM
Hmm, you are indeed correct. My mistake. Ill see what I can do for an action for this.
Title: Re: VRTK Actions
Post by: Doh on May 31, 2017, 04:11:54 AM
Cheers Tmeric!
Title: Re: VRTK Actions
Post by: tcmeric on May 31, 2017, 05:12:40 AM
Hi, give this a try and let me know if it works. It uses the event system, so it is listening for a grab event or a ungrab event. I am going to try and refine it a bit better, but you can start using it if you want, if you are in a rush.
Title: Re: VRTK Actions
Post by: Doh on May 31, 2017, 05:44:13 AM
Yeah these work well cheers! I'm using a fair few actions to achieve the desired effect but they certainly do the trick.

I'll keep checking back in case you can refine it.

Thanks!
Title: Re: VRTK Actions
Post by: tcmeric on May 31, 2017, 05:45:08 AM
Here is an updated version that triggers a playmaker event in the action optionally.
Title: Re: VRTK Actions
Post by: tcmeric on May 31, 2017, 05:46:15 AM
(The event should be triggered when an object is picked up, for example). It should also be a tiny bit more performant, as it unloads the listener after the action exits. (Behind the scenes stuff).
Title: Re: VRTK Actions
Post by: Doh on May 31, 2017, 06:11:56 AM
Works brilliantly!

It throws up an error in editor if the events script isn't there outside of runtime though that's no issue.

Does a listener of this scale cost much performance-wise? Guessing it must be checking every frame.
Title: Re: VRTK Actions
Post by: tcmeric on May 31, 2017, 06:29:44 AM
What error shows up? It should prompt you to add the correct script to the controller gameobject if it hasent been added (otherwise this action cannot run).

Yes, listeners need to run in everyframe in order to listen for changes. It shouldnt be anymore expensive then listening for on trigger events or keydowns, etc as far as I am aware.

Basically this is how VRTK does it, and I am just hooking into their listener using unity events.  8)
Title: Re: VRTK Actions
Post by: Doh on May 31, 2017, 06:43:19 AM
Yeah just the prompt to add the script, it adds itself at runtime if it's not there anyway. I've added mine in editor though, so all good!

Awesome, I'm quids in on the total listeners front as I toggle most of them on/off depending on where the player is, so I should be fine with these.
Title: Re: VRTK Actions
Post by: edufurla on June 23, 2017, 09:59:33 AM
Hi Tcmeric. Fantastic actions. Thanks for that!!!
I am trying to use pointerDestinationInfo but when I use models with parent structure the action only shows the name of the parent object, even when I point to some child object.
Are there any way to show the name of the point object like raycast do?

Thank you
Title: Re: VRTK Actions
Post by: edufurla on June 23, 2017, 10:06:47 AM
My bad. I was missing a big collider on the father object.
Thx