I made an animation in Blender using geometry nodes that I exported to USDC file (then I used Reality Converter to convert to USDZ) and I can see the animation when viewing from the finder but does not play after importing to RCP. Any idea how I can play the animation? Or can the animation be accessed through Xcode?
Thanks!
Animations do not play automatically. You have to write code to play an Entity's animation. Here's a snippet that creates an Entity (from a USDZ file in a RealityKit content bundle) and play's its animation.
RealityView { content in
if let scene = try? await Entity(named: "USDZName", in: realityKitContentBundle) {
content.add(scene)
if let animation = scene.availableAnimations.first {
scene.playAnimation(animation)
}
}
}
Here's a link to the documentation for Entity.playAnimation
.