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

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! Your feedback helps others to see the most helpful information.