PlayMaker Help & Tips > VR Help

VRTK - Get Controller Velocity - always 0,0,0 ?

(1/1)

OddButAwesome:
Hi all,

Having a challenging time getting a velocity reading from my Oculus Touch controller.

I am trying to upon Trigger (hold) spawn an object which I then release trigger and throw. Everything works except the throw part. I click and the fireball spawns in my hand. I can hold, move and rotate it as I wanted. When I go to throw and release the trigger it just drops to the ground.

I am watching the velocity in the inspector and it doesn't change from 0,0,0. Neither does the angular velocity. I have tried getting velocity from the RightController and the RightHandAnchor (parent when running) and also the spawned object itself.

I have tried turning the rigidbody component on/off (get/set property). Swapping the order of get / set velocity - not that this matters as the numbers still read 0,0,0.

Script Aliases for controllers are set correctly on the [VRTK_SDK_Manager].

I am obviously doing something wrong as the action works in the video tutes.

Can anyone please tell me where?

Thank you for your time reading. I appreciate your help.

Peace
JG

HAIRGROW:
Turn off isKinematic on the rigidbodies for the controllers, and you should able to obtain the velocity. I'm doing the same thing, but for the Vive. Hopefully it works for Occulus.

OddButAwesome:
Hi @HAIRGROW,

Thank you for taking the time to reply.

Unfortunately this did not work. I also just retried with a clean object, collider, rigidbody. Same result. :(

I will try more when I get home from work tonight.

Regards
JG

Navigation

[0] Message Index

Go to full version