Thrown objects do not inherit player body speed in flying game?! — Oculus
New to the forums? Click here to read the "How To" Guide.

Developer? Click here to go to the Developer Forums.

Thrown objects do not inherit player body speed in flying game?!

tkdHayktkdHayk Posts: 31 Oculus Start Member
I have a relatively simple question: How can I get the Global velocity of on Oculus touch controller? 

Currently, the GrabEnd() method of the OVRGrabber class contains the following line of code: Vector3 linearVelocity = trackingSpace.orientation * OVRInput.GetLocalControllerVelocity(m_controller);

The above code causes a released objects initial velocity to equal that of the controller, relative to its parent (tracking space). However, in my game,the player flies around, so if the player is flying at a constant speed, and releases a grabbed object, the grabbed object does not inherit the velocity of the player, so it falls straight down despite having been released from a fast moving player. In My Setup, I have a Rigibody Player controller, whose child is OVRCameraRig,  whose child is tracking space, whose child is the LeftHandAnchor of which OVRGrabber is a component.



Sign In or Register to comment.