Many thx @J0hn. With content.add(panelEntity) I get the attachment on screen visualized! In the wwdc2023 video and code example they don't use this and apply parentEntity.addChild(panelEntity) instead - but this doesn't work for me. So content.add seems to be must-have?
PS: I want to pin an attachment (text label) to an entity so that the label automatically moves with the entity and thought addChild would do this.
Post
Replies
Boosts
Views
Activity
@J0hn First I thought the child would be hidden by the parent (do you mean this with "inside"?) but I have repositioned it without any success. Then I tried to change scale factor in case it should be too small - same result. However, the child is added in the children collection. The parent entity is embedded in a scene created by Reality Composer Pro. Maybe this is the problem?
Adding via content.add works but in wwdc2023 code example they just use addChild which does not work for me. But I want to bind the attachment to the parent entity so that they e.g. move together when I reposition the parent.
But then panelEntity is still not tied to parentEntity, i.e. when I move parentEntity panelEntity stays fixed in the room.
..and beta 8 (15A5229m) that is shipped with visionOS 1.0 (21N5233f)
I have just setup a „hand made“ workaround solution by defining the cube on my own, i.e. I have created 6 separate entities for each side and tied them as children to a parent entity acting as the cube.