Reputation: 37616
So I figure out how to add a GearVrController to a scene.
The controller follows the hand movements.
But how can I implement the selection part + a ray from the device to the scene?
I mean a ray that can select item, like the image below that taken from Oculus menus.
I'm looking for a build-in solution from Oculus if there is one. (I don't care about the menu itself, I'm trying to understand how to implement selection with the controller)
Upvotes: 3
Views: 192
Reputation: 1815
Ray
you could use a so called LineRenderer
in Unity
. Attach one to your controller and via script you can assign the start and end point (SetPosition(int index, Vector3 position);
for indexes use 0 and 1 and the positions are the controller and the whatever you choose).Canvas
that sits on top of the controller at all times. You can toggle it on a specific button pres from the controllerUpvotes: 2