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

expose ARVRInterface::get_transform_for_eye to gdscript #68384

Merged
merged 1 commit into from
Nov 14, 2022

Conversation

cheece
Copy link
Contributor

@cheece cheece commented Nov 7, 2022

Hello

By exposing ARVRInterface::get_transform_for_eye, it's possible to implement true stereoscopic mirrors and portals in VR previously impossible in godot.

I made this specifically for 3.x since viewport textures seem to be not working on godot 4 with openxr yet and I couldn't make it work, but it 's rather easy to port (it would be get_transform_for_view instead)

I made a demo using the method to render stereoscopic mirrors in VR, it can be found here:
https://github.com/cheece/godot-vr-mirror-test

20221107152938_1_vr

update:

I found a workaround about the viewports not rendering in godot 4 and I got it working finally, so I made a PR to master too #68390

@cheece cheece requested a review from a team as a code owner November 7, 2022 18:48
@dsnopek
Copy link
Contributor

dsnopek commented Nov 7, 2022

That's awesome that you got stereoscopic mirrors going!

Exposing this method to GDScript sounds fine to me. However, I think you'll need to make the Godot 4 PR and have it get merged before this can be merged into Godot 3.

@cheece
Copy link
Contributor Author

cheece commented Nov 7, 2022

That's awesome that you got stereoscopic mirrors going!

Exposing this method to GDScript sounds fine to me. However, I think you'll need to make the Godot 4 PR and have it get merged before this can be merged into Godot 3.

Thanks, I just found a workaround about the viewports not rendering in godot 4, so it can be implemented now,

I'll work on the PR for master then

@cheece cheece force-pushed the expose_get_transform_for_eye branch from e0264db to 872e36b Compare November 10, 2022 18:26
Copy link
Contributor

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@akien-mga akien-mga merged commit 322bfec into godotengine:3.x Nov 14, 2022
@akien-mga
Copy link
Member

Thanks!

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.

4 participants