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

Desktop Turn overwriting camera X-Rotation even in full XR mode #684

Closed
Malcolmnixon opened this issue Sep 29, 2024 · 6 comments · Fixed by #687
Closed

Desktop Turn overwriting camera X-Rotation even in full XR mode #684

Malcolmnixon opened this issue Sep 29, 2024 · 6 comments · Fixed by #687

Comments

@Malcolmnixon
Copy link
Collaborator

The movement_desktop_turn.gd scripts physics_movement() method is resetting the player body camera X-rotation to 0 even when XR is actively being driven by a headset.

func physics_movement(delta: float, player_body: XRToolsPlayerBody, _disabled: bool):
# Skip if the player body isn't active
plr_body=player_body
if !player_body.enabled or xr_start_node.is_xr_active():
if clear_mouse_move_when_body_not_active:
mouse_move_vector=Vector2.ZERO
if clear_cam_x_when_body_not_active:
player_body.camera_node.rotation_degrees.x=0
return

When not in desktop mode the desktop movement providers should do nothing.

@Malcolmnixon
Copy link
Collaborator Author

Malcolmnixon commented Sep 29, 2024

@pietru2004 Could you look into this? While overwriting the camera doesn't visually corrupt XR experiences, it is resetting the Node3D rotation and so gaze-pointer actions (or other functions expecting to be able to read the camera rotation) are being affected.

@pietru2004
Copy link
Contributor

pietru2004 commented Sep 30, 2024

Last time I checked it wasn't doing anything when xr was active(headset active). Gona check again...

@pietru2004
Copy link
Contributor

pietru2004 commented Sep 30, 2024

I think, If you set clear_cam_x_when_body_not_active to false there should be no problems, also I think problem that surreal6 has is related to vr headset he had connected to pc.

@Malcolmnixon
Copy link
Collaborator Author

Yes, real XR mode can be fixed by overriding the default 'true' value of that value to be false, but that means the user has to explicitly disable a portion of the desktop behavior to get XR mode functioning correctly.

I'm still not clear why the desktop code is doing anything when the user isn't in desktop mode.

@surreal6
Copy link
Contributor

surreal6 commented Oct 3, 2024

Hi there, this seems to be the bug I was experimenting with the desktop function and the gaze pointer. I can confirm the problem

@pietru2004
Copy link
Contributor

hm... If I recall correctly the clear_cam_x_when_body_not_active was made for sitting and was meant only for desktop so the if statement should probably be altered. The clear_mouse_move_when_body_not_active is supposed to clear any mouse movement if player is not in desktop mode

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

Successfully merging a pull request may close this issue.

3 participants