Post

Replies

Boosts

Views

Activity

Reply to Anchor Window Group
If you decide to use mixed immersion and you want a view( for ex. a menu) that follows the user around you can do the following: create a head anchor add a very tiny entity ( to make practically invisible) to the head anchor add the head anchor to your root entity. create you view as an attachment and add it to your tiny entity. I'm unsure if this is the best way to do this. Notwithstanding Apple's visionOS HIG, it works reasonably well.
Sep ’23
Reply to Dragging coordinates issue in VisionOS
I was able to get it working. In case anybody is trying to do something similar, these are the steps I followed to be able to drag around an entity I had positioned on a vertical plane and limit the movements along its surface: Add to the current position of the object being dragged, the translation value from the drag gesture. Don't forget to convert the drag value to world coordinates first. Do a raycast from the origin in the direction of the dragging object to hit the plane anchor. Remember that the direction vector (based on the dragging object new pos) has to be normalized. Use the the hit position from the raycast result as the new position for the object. This will keep the the object in the surface of the plane. I know this explanation is a little abstract and lacking details. If I find time I'll post some sample code in github. The code in the ObjectPlacement project from Apple was pretty helpful.
Feb ’24