Question For VIVE DEVs - Motion Controller

Hey all, I’m currently experimenting with physics objects and I’m running into the issue when physics objects are held, anytime I roll the motion controller (razer) the object doesnt respect its value and turns another way, mostly in the yaw. I’m using the razer hydras for motion controls but still using the motion controller components so I was wondering when you Vive Devs attach physics controllers to your motion controller component is there quaternion math to be done or does the vive and steamVR handle that?

uh… The UE4 Motion Controller object is device independent, so it will work exactly the same with Vive motion controllers, Oculus Touch, and razer hydras.

I’m not sure what you’re doing, but I’m not attaching any physics controllers to my motion controller components. I’ve only been working with the vive for about 2 weeks though, so maybe you know more than I do? Can you elaborate?

Anyways, you can get the device position and orientation through the motion controller node, and its going to give you the same values regardless of what hardware you’re using.

My problem is when ever i rotate my controller in the x axis (roll) the physics object in my hand rotates along the z axis (yaw). When I pitch up or down or turning it in the yaw axis it works fine but it flips axes when I want to roll the object. I’ll post a short clip showing this later tonight. @Slayemin I hope this explained some, if you do get around to grabbing physics objects can you please update me and see if your rotations match you controller.

Just as a sanity check, you should draw some debug axes for your hand transform. Rotate your hand in as many directions as you want, you should be able to see no pops in the orientation axes. Here is a quick blueprint to help you:


If you notice any popping when you rotate your hand, that means your hand rotation math is wrong. If it looks smooth, then you can take the rotation from your hand and replace the world rotation of whatever object you’re holding with your hand rotation. Keep in mind, that you’ll be rotating your object around its local origin.