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

Godot 4.x Support #64

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Conversation

Makosai
Copy link

@Makosai Makosai commented Apr 17, 2024

This update mainly includes the following changes:

  • ARKit support in 4.x
  • Changes CameraMatrix to Projection

There are other changes.

TODO:

  • Add backwards compatibility with 3.x in the Engine and the GitHub Actions.
  • There are some sections that run but don't work. It's been a few months since I've made these changes so maybe Godot has updated enough to have those fixed and ready to be properly referenced.

@Makosai
Copy link
Author

Makosai commented Apr 17, 2024

The workflows are functional. But need to be reviewed. If I get approval, I'll dedicate some time to make them work with 3.x and 4.x seamlessly.

The same thing with the code itself and the game engine.

@BastiaanOlij
Copy link

Only noticed this PR now, have to find some time but cool to see someone is porting ARKit support to Godot 4 :)

@BastiaanOlij BastiaanOlij self-requested a review June 1, 2024 11:16
@Snowdaw
Copy link

Snowdaw commented Aug 19, 2024

Hi, I tried to port @BastiaanOlij's Godot 3 ARKit test project to Godot 4.3 with this updated codebase. Unfortunately I am getting the following error messages from Godot about undefined symbols.

ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
Undefined symbols for architecture arm64:
  "__print_line(String)", referenced from:
      print_line(Variant) in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "stringify_variants(Variant)", referenced from:
      print_line(Variant) in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::pre_render()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_view_count()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_system_info()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_vrs_texture()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::stop_passthrough()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_color_texture()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_depth_texture()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::pre_draw_viewport(RID)", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::start_passthrough()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::post_draw_viewport(RID, Rect2 const&)", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::set_play_area_mode(XRInterface::PlayAreaMode)", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_camera_transform()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_velocity_texture()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::trigger_haptic_pulse(String const&, StringName const&, double, double, double, double)", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::is_passthrough_enabled()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::supports_play_area_mode(XRInterface::PlayAreaMode)", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::is_passthrough_supported()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::set_environment_blend_mode(XRInterface::EnvironmentBlendMode)", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_supported_environment_blend_modes()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::end_frame()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "XRPositionalTracker::set_tracker_name(StringName const&)", referenced from:
      ARKitInterface::get_anchor_for_uuid(unsigned char const*) in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "XRPositionalTracker::set_tracker_type(XRServer::TrackerType)", referenced from:
      ARKitInterface::get_anchor_for_uuid(unsigned char const*) in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "XRPositionalTracker::XRPositionalTracker()", referenced from:
      ARKitInterface::get_anchor_for_uuid(unsigned char const*) in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "XRServer::add_tracker(Ref<XRPositionalTracker>)", referenced from:
      ARKitInterface::get_anchor_for_uuid(unsigned char const*) in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "XRServer::remove_tracker(Ref<XRPositionalTracker>)", referenced from:
      ARKitInterface::remove_all_anchors() in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
      ARKitInterface::remove_anchor_for_uuid(unsigned char const*) in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_play_area() const", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_play_area_mode() const", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_tracking_status() const", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_suggested_pose_names(StringName const&) const", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_suggested_tracker_names() const", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "Object::get_argument_options(StringName const&, int, List<String, DefaultAllocator>*) const", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** ARCHIVE FAILED **

They are not just related to the ARKit implementation code as these are also included.

Undefined symbol: __print_line(String)
Undefined symbol: stringify_variants(Variant)
...
Undefined symbol: Object::get_argument_options(StringName const&, int, List<String, DefaultAllocator>*) const

This leads me to believe there is more going wrong than just unimplemented functions. Which should also have caused issues for Godot 3's ARKit if they were necessary for basic functionality.

I hope this can help other people figure out where things go wrong, as I don't really know what to do to get this to work and I would really like to be able to use ARKit with Godot.

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