Post

Replies

Boosts

Views

Activity

Comment on Default RealityViewContent has multiple anchors?
But this won't change the fact that my anchoring under Visualization being randomly switched to ceiling/table/floor right? In the ARKit I only track handAnchor with HandTrackingProvider. I am thinking is it possible to use available anchors' transformation to transform my scene back to the correct position?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’24
Comment on Default RealityViewContent has multiple anchors?
Actually with your suggestion in mind, I specifically add an AnchorComponent on Root object of my loaded scene, and set it to anchored to "world". But it seems nothing has changed. I bet there were still some manual settings that I accidentally triggered the setup. Like "when you want to implement a feature, you have to set default anchor to automatic", and probably this line of code is hard coded in RealityKit.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’24
Comment on Default RealityViewContent has multiple anchors?
Hi @gchiste , I have check that out, my scene actually doesn't contain anything, just an empty scene and all the other game objects are placed and generated in runtime (by loading object from another .usda scene). I didn't find any AnchorComponent in any of my scene (.usda file). Is there any other way that may affect the anchored position?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’24
Comment on Default RealityViewContent has multiple anchors?
Also I wonder If I want to add an empty Entity as common parent to serve as the parent of all my different game scenes. Say I have different levels and when I switch from level 1 to level 2, I just need to write level1.removeFromParent() and myCommonParent.addChild(level2) to control over the level switch. Can I implement this by adding content.add(myCommonParent)? Seems like this can still lead to the anchor issue. But if myCommonParent = AnchorEntity(.world), would that be possible?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’24
Comment on Default RealityViewContent has multiple anchors?
Thanks! That really reminds me to checkout AnchorComponent. Probably I need to manually set AnchorComponent to the .world? Since my mainGameScene right now is just a default empty scene. I have checked my "Root" object and contains only default Transform and Material Bindings. But I do will attach AnchorComponent to my scene to see if that could override some default or unstable settings.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’24