Post

Replies

Boosts

Views

Activity

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.
Topic: Graphics & Games SubTopic: RealityKit Tags:
Feb ’24
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.
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’23
Reply to The developer disk image could not be mounted on this device
It is working now. Thank you!
Replies
Boosts
Views
Activity
Apr ’24
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.
Topic: Graphics & Games SubTopic: RealityKit Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Scene understanding missing from visionOS simulator?
Although what @JoonAhn says is correct, what the visionOS simulator needs to do is provide "simulated" plane information that matches the environments that are provided by Apple. This should not be too difficult, and would remove the requirement of having devs invest on expensive hardware in order to create apps for it.
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to 'init(make:update:attachments:)' is unavailable in visionOS
The attachments API changed a little bit for beta 8, it looks like this now: attachments: { Attachment(id: "menuHead") { ...// your view here } }
Topic: Graphics & Games SubTopic: RealityKit Tags:
Replies
Boosts
Views
Activity
Sep ’23
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.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to Color issues in Xcode Beta 6 using video material for visionOS
I was able to get attachment working. It was just a matter of placing and scaling.
Replies
Boosts
Views
Activity
Sep ’23
Reply to Color issues in Xcode Beta 6 using video material for visionOS
@stevenhoward , the line VideoMaterial(avPlayer: player) does compile ok with beta 8 but I am seeing different behavior with this latest beta, for ex., attachments stopped working for me, even after making the small api changes.
Replies
Boosts
Views
Activity
Sep ’23
Reply to Color issues in Xcode Beta 6 using video material for visionOS
Update: This seems to be related to the format of the video files. It is happening with mp4 files. MOV Files are played with the proper colors.
Replies
Boosts
Views
Activity
Aug ’23