Fix: add world tracking on Apple Vision Pro for drawables to be visible #3326
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the last issue with Apple Vision Pro rendering on a real device.
Note: While reviewing, look only at this commit: b83ca5e another one has already open PR (#3325)
Currently, when we don't attach the device anchor to the drawable (
cp_drawable_set_device_anchor
) the drawables are not presented on the device. To retrieve the device anchor we need to do following things:ar_world_tracking_configuration_t config = ar_world_tracking_configuration_create(); world_tracking = ar_world_tracking_provider_create(config);
Important
This is API suggestion that unfortunately changes public-facing API, I'm open to another solution to make it work.
bgfx::init
:Another possible solution is to run the ARSession inside BGFX, but this may limit the user's ability to run other providers like Hand Tracking Provider, etc.
You can see a full integration into the bgfx examples here: okwasniewski@337474a (it first requires #3292 to be merged)