In order to make the game interface interactive, we will utilize some of the input event handlers exposed in React 360. Input events are collected from mouse, keyboard, touch, and gamepad interactions, and also with the gaze button click on a VR headset. The specific input events we will work with are the onEnter, onExit, and onClick events.
- onEnter: This event is fired whenever the platform cursor begins intersecting with a component. We will capture this event for the VR objects in the game, so the objects can start rotating around the Y-axis when the platform cursor enters the specific object.
- onExit: This event is fired whenever the platform cursor stops intersecting with a component. It has the same properties ...