Skip to content

MRTKRayInteractor handedness #11821

Answered by keveleigh
j-polden asked this question in Q&A
Apr 10, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

You have two main options, both involving casting. The first directly accesses the property you asked about, while the second is essentially a reimplementation of that property. I'd probably recommend the first!

  1. Handedness handedness = ((IHandedInteractor)rayInteractor).Handedness;
  2. Handedness handedness = rayInteractor.xrController is ArticulatedHandController articulatedHandController ? articulatedHandController.HandNode.ToHandedness() : Handedness.None;

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@j-polden
Comment options

Answer selected by j-polden
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