GodotVR / godot-xr-tools

Support scenes for AR and VR in Godot
MIT License
471 stars 64 forks source link

Player height calibration does not wait for tracking data #609

Open Malcolmnixon opened 6 months ago

Malcolmnixon commented 6 months ago

The XRToolsPlayerBody.player_height_calibration boolean is set true by default to perform calibration "on the next frame" however the camera node used for calibration may not have been updated by the time of the first physics process frame resulting in an invalid calibration.

Unfortunately due to XRCamera3D being required to extend from Camera3D, it cannot also extend from XRNode3D and provide useful tracking and pose information.

BastiaanOlij commented 5 months ago

I think the height calibration boolean should be off by default and we should introduce a method to override it when the scene is used with our staging system.

Even if we wait until we have tracking info we will be calibrating at the wrong time. If the game is started, it is very likely the user is still fiddling around with their headset, it may be some time before they have put it on properly and walked over to the right spot, especially for PCVR. There is no way to automatically know when this happens.

In our staging system this all happens when the player is still in the original loading screen and why we wait until they press the trigger, so our moment of calibration is sound in this use case.

On Quest however there is a footnote here that does defend having this boolean true by default. Unless its a dev doing a test run from Godot, its very likely the player is already ready to play when the game starts as they will have started the game from the Meta UI. So there is a fundamental difference between the developers experience, and the end users experience.