playMaker

Author Topic: Steam VR Playmaker Toolkit - Help Board [VIVE]  (Read 38261 times)

jasonj_76

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« Reply #45 on: December 13, 2016, 05:34:37 PM »
One more question...Have you had any luck getting an object with a hinge joint to work with the controllers?  Using get/set position or parenting rips the object off of the hinge.  Imagine something like a door where you want it to stay in place, but would like the player to be able to grab it and open it. 

thanks,
Jason

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« Reply #46 on: December 13, 2016, 08:38:55 PM »
Hey Jason,

I have yet to try when it comes to hinge joints and the controller but I did create a tutorial a while back using hinge joints. It may work with the empty game object? Hopefully this helps out.
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

jasonj_76

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« Reply #47 on: December 15, 2016, 12:54:02 PM »
Thanks for the advice.  I looked at your video and there must be a problem with how the controllers interact with joints (hinge & fixed).  Using the controllers to grab any object with a joint rips the object from the joint.  So far, I've tried matching position and rotation and also tried parenting to the controller, but now I am starting to think that doing a match of velocity might be a better solution for this case.

thanks for your help,
Jason

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« Reply #48 on: December 15, 2016, 05:06:21 PM »
Please, let me know how the velocity works. What object are you trying to attach to the controller?
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

jasonj_76

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« Reply #49 on: December 16, 2016, 12:41:39 AM »
It is a valve on a pipe that is attached to the pipe.  It is connected to the pipe with a hinge joint and turning it 90 degrees would turn off steam coming out of the pipe.

Kinda like this:

http://www.valvesandflowcontrolresources.co.uk/uploads/gallery/16/32.jpg


LordHorusNL

  • Beta Group
  • Full Member
  • *
  • Posts: 226
Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« Reply #50 on: January 08, 2017, 06:38:09 PM »
Hey sebaslive

I'm trying to get touchpad movement working where the player moves in the direction the controller is facing.

I am able to get the xy inputs and apply velocity to the player/camerarig easy enough but have not been successful in getting the rig to move in the direction of the controller.



I've tried getting the controller rotation and applying it to the rig, but no luck.
Can you give me any tips on how i could achieve this?

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« Reply #51 on: January 09, 2017, 01:43:26 AM »
Hey LordHorusNL,

This is a bit trickier but in most cases based on direction we must use the Transform Direction action. We want to know where Forward is and forward is always +1 on Z.

So we have the touchpad axis first. Then we use the transform direction, and I set it up to move forward based on where I am looking, so for the game object, I set it to Camera (head). In local direction I set the X and Y to 0 and Z to 1. I then stored the Vector 3 result.

Next we Get Vector 3 XYZ (action) from our new vector 3 variable and store the X (headset x) and Z (headset z). Now I use Get Vector2 XY and store the Y (axis Y). I use the float multiply action to multiply headset Z by axis Y (so that if not touching the touchpad it will be at 0 therefore multiplying any value to 0 so the only movements that occur are when the touchpad is pressed). I then multiply headset X and by axis Y. Now we create a new Vector 3 (headset) and set the X to headset x and Z to headset Z (I also set the Y to zero so that it will always be zero). And I used translate to move the headset, I set the game object to Camera Rig and Vector to my new headset variable. Now any direction I look, and I press down on the touchpad y it will move forward in that direction.

That will move your character, if you would also like to use the X on touchpad axis, you would do the same steps but now add the two vector3's at the end together and place that new variable in translate. I would suggest testing out different methods of movement to see what works best for you.

I hope this helps! If you have any questions, please let me know!
« Last Edit: January 09, 2017, 01:50:53 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

LordHorusNL

  • Beta Group
  • Full Member
  • *
  • Posts: 226
Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« Reply #52 on: January 09, 2017, 10:45:36 AM »
Thank you so much, this worked perfectly! now i don't have to use VRTK for movement anymore.

Like the poster above i am also interested in using playmaker to operate doors/levers on hinges, so that will probably be my next hurdle ;D

Thanks for the great support man!

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« Reply #53 on: January 09, 2017, 11:10:40 AM »
Great! Glad it worked, it is actually the same method VRTK uses their movement but done using Playmaker actions instead of scripting.

I have been wondering how Jasons testing went with the velocity. But keep me posted if you find something that works for your levers!

and you're welcome, very happy to help.
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

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« Reply #54 on: January 12, 2017, 03:29:37 PM »
FYI: Steam has updated their plugin, which is not currently working with the Toolkit scripts yet. I will update here when available, thanks!
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

stitchlips

  • Playmaker Newbie
  • *
  • Posts: 18
Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« Reply #55 on: February 15, 2017, 05:22:41 PM »
Hey LordHorusNL,

This is a bit trickier but in most cases based on direction we must use the Transform Direction action. We want to know where Forward is and forward is always +1 on Z.

So we have the touchpad axis first. Then we use the transform direction, and I set it up to move forward based on where I am looking, so for the game object, I set it to Camera (head). In local direction I set the X and Y to 0 and Z to 1. I then stored the Vector 3 result.

Next we Get Vector 3 XYZ (action) from our new vector 3 variable and store the X (headset x) and Z (headset z). Now I use Get Vector2 XY and store the Y (axis Y). I use the float multiply action to multiply headset Z by axis Y (so that if not touching the touchpad it will be at 0 therefore multiplying any value to 0 so the only movements that occur are when the touchpad is pressed). I then multiply headset X and by axis Y. Now we create a new Vector 3 (headset) and set the X to headset x and Z to headset Z (I also set the Y to zero so that it will always be zero). And I used translate to move the headset, I set the game object to Camera Rig and Vector to my new headset variable. Now any direction I look, and I press down on the touchpad y it will move forward in that direction.

That will move your character, if you would also like to use the X on touchpad axis, you would do the same steps but now add the two vector3's at the end together and place that new variable in translate. I would suggest testing out different methods of movement to see what works best for you.

I hope this helps! If you have any questions, please let me know!

You don't happen to have a screenshot of this do you? We tried to get it working and it kind of works. When you press up on the trackpad, you go in a northwest direction instead of North. Does that make sense?

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« Reply #56 on: February 15, 2017, 05:38:10 PM »
Hey Stitchlips,

Can you go through your actions closely to make sure that there is nothing being grabbed by any other axis in the steps. If you are going in any axis other than Z (forward) than it most likely is that in creating a new vector or the translate, another value (maybe X) has been accidentally placed in. I don't have any screenshots, but I will take this into account for the next update.

Please let me know if this helps and thanks for the question/suggestion.
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

stitchlips

  • Playmaker Newbie
  • *
  • Posts: 18
Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« Reply #57 on: February 15, 2017, 06:27:09 PM »
Hey Stitchlips,

Can you go through your actions closely to make sure that there is nothing being grabbed by any other axis in the steps. If you are going in any axis other than Z (forward) than it most likely is that in creating a new vector or the translate, another value (maybe X) has been accidentally placed in. I don't have any screenshots, but I will take this into account for the next update.

Please let me know if this helps and thanks for the question/suggestion.
Thanks for the quick reply. Let me give it a look.

stitchlips

  • Playmaker Newbie
  • *
  • Posts: 18
Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« Reply #58 on: February 16, 2017, 11:45:17 AM »
Hey Stitchlips,

Can you go through your actions closely to make sure that there is nothing being grabbed by any other axis in the steps. If you are going in any axis other than Z (forward) than it most likely is that in creating a new vector or the translate, another value (maybe X) has been accidentally placed in. I don't have any screenshots, but I will take this into account for the next update.

Please let me know if this helps and thanks for the question/suggestion.

All right. We got it working. Thanks for the help!

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« Reply #59 on: February 16, 2017, 11:50:32 AM »
Great! What was going on? In case anyone comes across the issue, was it the x value?
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