Forum Discussion
knowledgehammer
11 years agoHonored Guest
OVR Controller lacks Collision Detection for Mousedown?
In Unity, I have recently tried to construct a quick simulation of the maze from 'maze runner', yet when i tried to touch the button in-game, it couldn't be done. The OVR controller doesn't have the capability for mouse clicks to buttons or colliders? Does anyone know a solution to this problem? Seriously hunting for a solution, but haven't found one yet... any help would be greatly appreciated. Using the 4.6 Beta with the latest Oculus integration...
3 Replies
Replies have been turned off for this discussion
- knowledgehammerHonored GuestAs simple as it sounds, all im trying to do is get the ability to click on whatever is in the center of my oculus rift vision ... a button or a collider... such a simple thing taken for granted in the normal unity playercontroller, seems inactive in the OVR player...
- moltonExplorerit sounds like you want to use a raycast and detect the button's collider with a raycasthit
http://docs.unity3d.com/ScriptReference/Physics.Raycast.html - vrdavebOculus StaffExactly. Instead of using "Camera.main.ScreenPointToRay(Input.mousePosition)" as in non-VR apps, it works well to use "new Ray (transform.position, transform.forward)" from a GameObject halfway between the left and right eyes.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device