With RealityKit in visionOS, is it possible to display floating views near entities?

Hey folks,

I'm wondering if I can make views float near some entities, right above their heads, and have them always face towards the user.

Embarrassingly, I've spent some time going through the documentation, but haven’t come across any API that would allow me to achieve this. I thought there might be a component to attach a view, or some other mechanism to provide a callback of sorts, letting me create a view for an entity whenever needed. However, I haven't found any such API so far.

Any insights or guidance would be super appreciated. Thank you!

Accepted Answer

Does the RealityView attachment closure not satisfy what you're trying to achieve? I wrote these notes on the WWDC video that explains the attachment closure, but I know it is a bit outdated as they made a significant update to the way the attachment closure works in the latest RealityView protocol. Hopefully this is a helpful start though https://www.wwdcnotes.com/notes/wwdc23/10081/

With RealityKit in visionOS, is it possible to display floating views near entities?
 
 
Q