Relative Content

Tag Archive for entityrealitykitcoordinate-transformationvisionos

Don’t understand coordinate conversion of visionOS RealityKit

I want to convert a world coordinate to the local coordinate of a RealityKit entity.
According to the docs, this should be possible using convert(position:from:), called on the entity.
Since it did not work as expected, I wrote a little test project. I used Apple’s template for a visionOS immersive app, and modified it slightly. This is my immersive view:

Don’t understand coordinate conversion of visionOS RealityKit

I want to convert a world coordinate to the local coordinate of a RealityKit entity.
According to the docs, this should be possible using convert(position:from:), called on the entity.
Since it did not work as expected, I wrote a little test project. I used Apple’s template for a visionOS immersive app, and modified it slightly. This is my immersive view: