Skip to main content
Up and Coming
December 18, 2018

Getting Touch Controller Velocity

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?
This topic has been closed for replies.

1 reply

New Participant
March 19, 2020
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)