Skip to content

OnPointerDragged() MRTK 3 implementation #11760

Answered by AMollis
camroo29 asked this question in Q&A
Discussion options

You must be logged in to vote

@camroo29, you'll need to read up on Unity's XRI package. All interactions in MRTK3 go through this input system, which is sufficiently different than MRTK2.

One approach for handling drag in Unity's XRI is.

  1. Create a component that extends from XRBaseInteractable.
  2. Component overrides XRBaseInteractable::onSelectEntered and tracks when item is selected.
  3. Component overrides XRBaseInteractable::ProcessInteractable, and components the drag amount in this function (see MRTK3's ObjectManipulator::ProcessInteractable for an example).
  4. Component overrides XRBaseInteractable::onSelectExited and tracks when item is unselected.

I highly recommend reading up on https://docs.unity3d.com/Packages/com.…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@camroo29
Comment options

Answer selected by camroo29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants