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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/classes/ARVRInterface.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@
If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.
</description>
</method>
<method name="get_transform_for_eye">
<return type="Transform" />
<argument index="0" name="eye" type="int" enum="ARVRInterface.Eyes" />
<argument index="1" name="transform" type="Transform" />
<description>
Returns the transform for an eye multiplied by [code]transform[/code]. The usual value for [code]transform[/code] is the global_transform of the current ARVROrigin.
</description>
</method>
<method name="initialize">
<return type="bool" />
<description>
Expand Down
1 change: 1 addition & 0 deletions servers/arvr/arvr_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ void ARVRInterface::_bind_methods() {

ClassDB::bind_method(D_METHOD("get_render_targetsize"), &ARVRInterface::get_render_targetsize);
ClassDB::bind_method(D_METHOD("is_stereo"), &ARVRInterface::is_stereo);
ClassDB::bind_method(D_METHOD("get_transform_for_eye", "eye", "transform"), &ARVRInterface::get_transform_for_eye);

ADD_GROUP("Interface", "interface_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interface_is_primary"), "set_is_primary", "is_primary");
Expand Down