cancel
Showing results for 
Search instead for 
Did you mean: 

How to register on pick up and on drop while using hand tracking (no controllers)

mcollins-1994
Honored Guest

Hey guys, I'm working in the Meta All In One package and I'm using hand tracking. I'm trying to create a darts game where you just throw darts at a dart board. I have everything set up and it's working fine but I'm not able to get enough velocity while throwing the dart.

I've set the weight lower, I've removed drag, etc. Does anyone have any advice on how to make the dart throw feel more realistic? My first idea is to apply a force to it when the hand releases it but I can't find anywhere in the docs or online how to get the throw event to trigger something like that with Hand Tracking rather than a controller.

What I want to do now is apply a velocity forward on the dart when it's thrown so I can get more distance but I don't know how to know when the dart is actually thrown. In other SDK's there are "OnGrab" and "On Release" events that you can subscribe to. 

Any advice would be appreciated.

2 REPLIES 2

Lechooga
Explorer

You can subscribe to the hand events in OVRHand to get that. There's an IsReleased bool in there that should give you what you're looking for. In the rig it's under OVRCameraRig > (Left/Right)HandAnchor > Hand Tracking (Left/Right)

Lanzelot108
Explorer

Hi @mcollins-1994 

The events you want to use are available through the InteractableUnityEventWrapper component.
Add it to your HandGrabInteractable game object. The events are WhenSelect and WhenUnselect. You can wire them directly in the editor.

See also: Event Wrappers