Please Select Your Location

Thailand
Australia
Österreich
België
Canada
Canada - Français
中国
Česká republika
Denmark
Deutschland
France
HongKong
Iceland
India
Ireland
Italia
日本
Korea
Latvija
Lietuva
Lëtzebuerg
Malaysia
Malta
Mexico
Nederland
New Zealand
Norge
Polska
Portugal
Russia
Saudi Arabia
Singapore
Southeast Asia
España
Suisse
Suomi
Sverige
台灣
Ukraine
United Kingdom
United States
Việt Nam
المملكة العربية السعودية (Arabic)

How do I know if a controller sends an event?

In WaveVR SDK 3.0, only one controller can send events when using 2 controllers simultaneously. The controller that can send an event has a beam and pointer. A player in VR can change the controller that can send an event by pulling the trigger on the controller.

In WaveVR SDK, a controller can be set as Dominant or Non-Dominant. Check the code below to know whether a controller sends an event.

private GameObject eventSystem = null;
private void checkEventController()
{
    // Get eventSystem instance.
    if (EventSystem.current == null)
    {
        EventSystem _es = FindObjectOfType<EventSystem> ();
        if (_es != null)
        {
            this.eventSystem = _es.gameObject;
        }
    } else
    {
        this.eventSystem = EventSystem.current.gameObject;
    }

    // Get WaveVR_ControllerInputModule to check event.
    if (this.eventSystem != null)
    {
        WaveVR_ControllerInputModule _cim = this.eventSystem.GetComponent<WaveVR_ControllerInputModule> ();
        if (_cim != null)
        {
            bool DominantControllerHasEvent = _cim.DomintEventEnabled;
            bool NonDominantControllerHasEvent = _cim.NoDomtEventEnabled;
        }
    }
}
Submit
Thank You!