Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make proper use of WaitGetPoses #141

Open
wants to merge 1 commit into
base: Godot-3.x
Choose a base branch
from

Conversation

BastiaanOlij
Copy link
Member

The function WaitGetPoses returns two sets of tracking data. Tracking data for the current frame, and predictive tracking data for the next frame.

We call, as we should, WaitGetPoses as close to when we render as possible, however we do not update the positions of our node until we process the next frame.

This PR ensures that our head position for rendering uses the most up to date tracking data as we currently do, but we now use the predictive tracking data for the next frame when positioning nodes.

Now Godot 3 still processes this data within _process so we do not have the nodes in the correct position until after that nodes _process has run, but this can be dealt with. This is something that has been improved in Godot 4.

But with this fix it should ensure that controller positions no longer seem to be a frame behind and more importantly, that nodes childed to the ARVRCamera will appear in the correct position.

@BastiaanOlij BastiaanOlij added this to the 1.2.0 milestone Jan 26, 2022
@BastiaanOlij BastiaanOlij self-assigned this Jan 26, 2022
@beniwtv
Copy link
Collaborator

beniwtv commented Jan 28, 2022

Very cool! Gonna have to give this a spin soon :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants