Post

Replies

Boosts

Views

Activity

Reply to RealityView attachments do not show up in Vision Pro simulator
Finally I got the solution (at least for my problem): Let parentEntity be loaded to RealityView via make closure and panelEntity be included in the RealityView as attachment, e.g. representing a text label. Then you can either use content.add(panelEntity) to bring the attachment to live (as proposed by @J0hn), however, it's isolated and not tied to the parent. So if you want to link panel and parent (e.g. for automatically movement of the label with the parent) you need to use parentEntity.addChild(panelEntity, preservingWorldTransform: true) Here preservingWorldTransform was the key for me. Default setting is false and without this flag the panel was not shown on screen (at least in Xcode preview and Vision Pro simulator).
Topic: Graphics & Games SubTopic: RealityKit Tags:
Aug ’23
Reply to RealityView attachments do not show up in Vision Pro simulator
@J0hn @PatrickDevX When I add the panelEntity (added as attachment) via parentEntity.addChild(panelEntity, preservingWorldTransform: true) the panelEntity becomes visible but it's not tied to the parentEntity and keeps fixed when parentEntity moves in space. When I set preservingWorldTransform to false (which is addChild default setting) the panelEntity does not show up as before.
Topic: Graphics & Games SubTopic: RealityKit Tags:
Aug ’23