0 votes
by (120 points)

Hello, for an application where the player is controlling a vehicle I want to make the player able to recenter themselves. Ideally this would be done by holding the pico button to recenter just like you would normally with the pico.

Is there an event within the Unity XR Pico SDK that fires as soon as the player recenters themselves using the pico button that I can subscribe to?

1 Answer

0 votes
by (55.5k points)

Dear developer,
You can implement the recenter function from the following code:

InputDevices. GetDeviceAtXRNode (XRNode. Head). Subsystem. TryRecenter ();

You can refer to the following links for more information:
https://docs.unity.cn/Manual/xrsdk-input.html

by (120 points)

Hi thanks for answering. My question was more about how I could call something like that by long-pressing the pico home button - just like you would recenter normally with the Pico. I saw that you can set the function of the home button to some built-in functions but not something custom?

by (55.5k points)

Dear developer,

The long-press home button function cannot be modified. Only single-click and double-click events can be modified.

public enum HomeEventEnum
{
    SINGLE_CLICK,    // single click
    DOUBLE_CLICK     // double click
}

Currently, only the following four functions are supported. Custom functions are not supported.

   public enum HomeFunctionEnum
    {
        VALUE_HOME_GO_TO_SETTING = 0,    // Go to settings
        VALUE_HOME_RECENTER = 2,         // Recenter
        VALUE_HOME_DISABLE = 4,          // Disable the event of Home key
        VALUE_HOME_GO_TO_HOME = 5        // Go to Home
    }
by (120 points)

Is it possible to bind to some kind of callback/event when the Pico is recentered then?

by (55.5k points)

Dear developer,
The Recenter function of the Pico Home button has no callbacks or events.

by (100 points)

I'm trying to implement a specific behavior on a tutorial that checks if the player has recentered but can't find a way to listen to the recent event.

Is it exposed anywhere?

by (39.2k points)

Dear developer,
Sorry, the Recenter function has no callbacks or events.

...