Sliders in Unity VR
问题 We're working on a video player app for the Go. We built a straightforward raycaster script to trigger onClick events when a user points at a UI Button element and pulls the trigger: bool triggerPulled = OVRInput.GetDown(OVRInput.Button.PrimaryIndexTrigger); if (Physics.Raycast(transform.position, transform.forward, out hit, 1000)) { if ( triggerPulled ) { // if we hit a button Button button = hit.transform.gameObject.GetComponent<Button>(); if (button != null) { button.onClick.Invoke(); } }