Forum Discussion
I'm using IsdkSystem.registerObserver to receive PointerEvent objects for scroll gestures on a control panel. Currently, I can access event.scrollInfo.x and event.scrollInfo.y, but I need to differentiate between scroll events from the left controller vs. the right controller.
Does PointerEvent expose which controller/hand generated the event?
Is there a way to register observers for only one controller (e.g., only right controller events)
- ymzh6 months agoMeta Employee
Hi Vivan_kovari !
You can use the getHandForPointerEvent(pointerEvent: PointerEvent): Hand? method defined in IsdkSystem to get which controller/hand generated the event.
You can access the IsdkSystem instance by doing:
import com.meta.spatial.isdk.IsdkSystem systemManager.findSystem<IsdkSystem>().getHandForPointerEvent(event)
getHandForPointerEvent(pointerEvent: PointerEvent): Hand? can return three values: HAND.LEFT representing left hand/controller; HAND.RIGHT representing right hand/controller; and null.Hope this helps!
-Y
→ Find helpful resources to begin your development journey in Getting Started
→ Get the latest information about HorizonOS development in News & Announcements.
→ Access Start program mentor videos and share knowledge, tutorials, and videos in Community Resources.
→ Get support or provide help in Questions & Discussions.
→ Show off your work in What I’m Building to get feedback and find playtesters.
→ Looking for documentation? Developer Docs
→ Looking for account support? Support Center
→ Looking for the previous forum? Forum Archive
→ Looking to join the Start program? Apply here.
Recent Discussions
Accessibility Request Support for Power Wheelchair Joystick and Bluetooth Mouse Inputs Meta Quest 3
Hello Meta Developer Community, My name is Rodrigo Sologaistoa. I am a biologist pursuing a master’s degree in bioinformatics, and I work at the Biomolecule Simulation Laboratory at the Institut Pas...