Post

Replies

Boosts

Views

Activity

Reply to GeoAnchor saving multiple anchors after removeall anchors method
The example code from Apple uses a computed var to store the array of placed Geoanchors in the scene but since the computed variable is read-only, the values in the array cannot be removed when the scene is reset so it was keeping a long list every time a model was added to the scene with no way to delete them (that I know of.) Fixed the issue by not using a computed variable and modifying the code accordingly: var currentAnchors: [ARAnchor] = [] // from var currentAnchors: [ARAnchor] { return arView.session.currentFrame?.anchors ?? []} append the geo anchor to the array when the anchor is placed in the scene add currentAnchors.removeAll() in the reset AR session function Not sure if this is helpful at all to anyone out there but I'm glad I figured it out! ** Anyone know why they used computed variable for storing AR Anchors?
Topic: Spatial Computing SubTopic: ARKit Tags:
Jul ’21
Reply to GeoAnchor saving multiple anchors after removeall anchors method
I found the logic problem, when a session is reset, arView.scene.anchors.removeAll() statement is executed but does not clear a global variable : var currentAnchors: [ARAnchor] { return arView.session.currentFrame?.anchors ?? [] }. I'm not 100% positive but it looks like this statement adds an element in the array every time an anchor is added to a scene but does not get cleared when the anchors in the scene are removed. Anyone recommend the best way to clear the array when its a computed variable? It wont allow me to use removeall()
Topic: Spatial Computing SubTopic: ARKit Tags:
Jul ’21
Reply to Animations exported from Blender does not shoe in Reality Composer Pro
Thanks! I'm aware that you have to activate the animation in Xcode but I thought you could also see the animation when you import it into Reality Composer Pro as I'd like to see how it changes with shader graph applied. Is this possible? As it does not play the animation in RCP. Thanks again!
Replies
Boosts
Views
Activity
Jun ’24
Reply to Access to Shader Graph Node Values from Xcode
Awesome! Is there an example that uses these two APIs that show how to retrieve the values from RCP shader graph?
Replies
Boosts
Views
Activity
Jun ’24
Reply to MusicKit Dev Token Refresh
Hi, having the same issue but the bundle ID does not appear on the list under the Identifier subsection. Why is that? and how do i get the bundle ID to show? thank you.
Topic: Media Technologies SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to GeoAnchor saving multiple anchors after removeall anchors method
The example code from Apple uses a computed var to store the array of placed Geoanchors in the scene but since the computed variable is read-only, the values in the array cannot be removed when the scene is reset so it was keeping a long list every time a model was added to the scene with no way to delete them (that I know of.) Fixed the issue by not using a computed variable and modifying the code accordingly: var currentAnchors: [ARAnchor] = [] // from var currentAnchors: [ARAnchor] { return arView.session.currentFrame?.anchors ?? []} append the geo anchor to the array when the anchor is placed in the scene add currentAnchors.removeAll() in the reset AR session function Not sure if this is helpful at all to anyone out there but I'm glad I figured it out! ** Anyone know why they used computed variable for storing AR Anchors?
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to GeoAnchor saving multiple anchors after removeall anchors method
I found the logic problem, when a session is reset, arView.scene.anchors.removeAll() statement is executed but does not clear a global variable : var currentAnchors: [ARAnchor] { return arView.session.currentFrame?.anchors ?? [] }. I'm not 100% positive but it looks like this statement adds an element in the array every time an anchor is added to a scene but does not get cleared when the anchors in the scene are removed. Anyone recommend the best way to clear the array when its a computed variable? It wont allow me to use removeall()
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
Jul ’21