About getting controller input
UI POINTER CLICK
About click judgment using event
- This method is recommended because it is a simple method and works on any platform.
- In the VR version of the STYLY app, the trail of the pointer extends beyond the controller and you can click on an object.
- In the player and smartphone version of STYLY Gallery, you can operate an object by clicking or tapping it with the mouse.
- It does not work in the web version of Studio.
- procedure
- Prepare a GameObject with a collider (for example, Unity's Cube or Sphere).
- Add a PlayMakerFSM component to the same GameObject.
Add Global Transition
menu on the FSM edit screen, add a transition when aUI POINTER CLICK
- When testing with Unity before uploading, adding the PhysicsRaycaster component to the Main Camera in the Unity scene and placing the EventSystem in the scene will also work in Unity's play mode.
Controller button event
In the STYLY app for VR, the following PlayMaker global events are incorporated in STYLY.Each operation fires a corresponding event, and you can use these events to transition states. Not available for web version Studio, STYLY Gallery players, and STYLY apps for smartphones.
For the left controller (L) and right controller (R), the grip button, menu button, touchpad, and trigger will fire when they are pushed (PressDown) and when they are released (PressUp).
For the trigger and touchpad, the touchdown (TouchDown) and release (TouchUp) events also fire.
It can be used by creating an event with the following name.
- Trigger button
Global_TriggerPressUp_L
Global_TriggerPressDown_L
Global_TriggerPressUp_R
Global_TriggerPressDown_R
Global_TriggerTouchUp_L
Global_TriggerTouchDown_R
Global_TriggerTouchUp_R
Global_TriggerTouchDown_L
- Touchpad
Global_TouchpadPressUp_L
Global_TouchpadPressDown_R
Global_TouchpadPressUp_R
Global_TouchpadPressDown_L
Global_TouchpadTouchUp_L
Global_TouchpadTouchDown_L
Global_TouchpadTouchDown_R
Global_TouchpadTouchUp_R
- Grip button
- Global_GripPressUp_L
- Global_GripPressDown_L
- Global_GripPressDown_R
- Global_GripPressUp_R
- menu button
- Global_MenuPressUp_L
- Global_MenuPressDown_L
- Global_MenuPressUp_R
- Global_MenuPressDown_R
- Trigger button
important point
- Some events may not be available depending on the VR device.Also note that Mirage Solo and Oculus Go have only one left or right controller.
- The event will fire even when the menu is displayed, so be careful not to malfunction.