Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
zacheri's avatar
zacheri
Explorer
6 years ago

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

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

Replies have been turned off for this discussion
  • Nashoute's avatar
    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's avatar
    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?
  •  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.