cancel
Showing results for 
Search instead for 
Did you mean: 

How would I go about doing something when an object is grabbed/released?

zacheri
Explorer
As the title says, I would like to set it up so I can execute code when an object is grabbed or released. How would I go about doing that?
3 REPLIES 3

Nashoute
Honored Guest
The OVRGrabable have functions like "GrabBegin" or "GrabEnd", just do your custom script, inherits the OvrGrabable and custom your grabs. If you are looking to your hands, there is also a GrabBegin and a GrabEnd in the OVRGrabber.

verdemis
Honored Guest

Nashoute said:

The OVRGrabable have functions like "GrabBegin" or "GrabEnd", just do your custom script, inherits the OvrGrabable and custom your grabs. If you are looking to your hands, there is also a GrabBegin and a GrabEnd in the OVRGrabber.



I'm looking after something like this, but I'm using the XR Interaction Toolkit, and as far as I know they don't have such events?

Umbrinox
Explorer
 In the premium learning (free currently) there are VR tutorials and they already have the scripts pre written for things like this.  I just cut and pasted them into my own project.