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!
Post
Replies
Boosts
Views
Activity
Awesome! Is there an example that uses these two APIs that show how to retrieve the values from RCP shader graph?
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.
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?
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()
thank you gchiste, the code worked! I've been looking for this solutions for a few days now.