Playmaker Forum

PlayMaker Help & Tips => VR Help => Topic started by: VREnvironment on March 08, 2018, 04:36:03 AM

Title: Detecting Horizontal Position of a controller
Post by: VREnvironment on March 08, 2018, 04:36:03 AM
Hey Guys!
I just started my journey with Playmaker, Unity and HTC Vive.

I have a problem that I cannot seem to be able to solve. How can I detect whether the controller is horizontal to the ground and what is the angle between the controller and the floor in degrees?

(https://i.imgur.com/e51wta0.png)

I have tried getting the rotation, raycasting etc. but cannot get it to work.
Title: Re: Detecting Horizontal Position of a controller
Post by: tcmeric on March 08, 2018, 04:46:17 AM
Are you using the VRTK toolset?
Title: Re: Detecting Horizontal Position of a controller
Post by: VREnvironment on March 08, 2018, 04:57:57 AM
Yes, I am
Title: Re: Detecting Horizontal Position of a controller
Post by: tcmeric on March 08, 2018, 06:55:13 AM
I dont have an answer off hand. Jump over to the slack chat and I can probably work something out however.

invite-playmaker-slack.herokuapp.com