cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Touch Controller Velocity

yoyoguyss1
Explorer
Hello,

I have been trying to implement everything from the character controller and grabbing objects using touch controllers from scratch.

I have set up my player object such that when I want to rotate I rotate a parent object and not the camera itself since I have no access to it thanks to the way VR is implemented in Unity.

Now I am getting my Velocity for my Controller like this OVRInput.GetLocalControllerVelocity(RightOrLeftController) and this works fine.

But when I rotate camera and toss an object the physics works the opposite direction because I am guessing the controller velocity is relative (local) to parent object.

How do I get Controller Velocity with respect to the world and not local to an object?
1 REPLY 1

vwing
Honored Guest
Very late reply, but this post showed up in my google search soo...

You need a reference to the tracking space (the parent of the hands) then just do trackingSpace.transform.TransformVector(OVRInput.GetLocalControllerVelocity(RightOrLeftController)