Post

Replies

Boosts

Views

Activity

Reply to Placing Item on plane, position is great, but trouble with rotation
My Solution You can get the location of the tap gesture on an entity with: let worldPosition: SIMD3<Float> = value.convert(value.location3D, from: .local, to: .scene) You can grab he orientation of the tapped plane with let rotation = value.entity.orientation(relativeTo: nil) I want to track this location so it can be persisted in the WorldTrackingProvider (whenever it works??? ) with a world anchor. I do so by making a world anchor with: let pose = Pose3D(position: worldPosition, rotation: rotation) let worldAnchor = WorldAnchor(originFromAnchorTransform: simd_float4x4(pose)) When you get the anchor from your world tracking listener you can apply it's transform (which contains position and orientation) to an entity like so: entityForAnchor.transform = Transform(matrix: anchor.originFromAnchorTransform) If you've got another way, or a way that has a more intuitive use of the API topology please share. This was cobbled together with a ton of trial and error.
Oct ’23
Reply to How can I pinch to open a menu in VisionOS simulator?
I don’t see code in your recent post that invokes the open window command. However, without an entity to receive the tap, it may not be possible to do what you want. An empty Immersive View doesn’t have anything to receive the tap. You may need to use the scene reconstruction provider to generate meshes of the world so those meshes can receive the taps. This is not available in the simulator at the moment.
Sep ’23