TLDR: Timeline does not play animation when Repeat Forever is checked.
Hi! I have created a timeline for my model that does a built-in emphasize animation. Then I added a behavior to my model and has set OnAddedToScene with action to run that timeline. It works perfect well on my device. But I want the timeline to be looped. I realized that there's no loop option in the timeline, but I noticed that I can loop it if I insert it into another timeline(The loop checkbox shows up). So I did that and had my model's behavior to run that timeline. But then the model doesn't play the animation as intended.
Note: I am not making a VisionPro app, but an iOS app leveraging ARKit and RealityKit
Environment: iPhone 13 Pro Max with iOS18.0
Code:
struct ARViewContainer: UIViewRepresentable {
func makeUIView(context: Context) -> ARView {
let arView = ARView(frame: .zero)
arView.session.run()
Task {
do {
let anchor = AnchorEntity(plane: .horizontal)
let emojiScene = try await Entity(named: "SunglassesScene", in: bubbleAR
anchor.addChild(emojiScene)
arView.scene.addAnchor(anchor)
} catch {
print("Failed to load models: \(error)")
}
}
return arView
}
}
Thank you!
Post
Replies
Boosts
Views
Activity
Behavior:
Orbit animation doesn't show up. Both for OnTap trigger and OnAddedToScene trigger. It is not an issue with my code because I tested with an emphasize float animation and it works perfectly.
Environment:
ARKit + RealityKit, iOS18
My animation timeline settings:
A simple Orbit animation block with a target, a pivot entity. 1s duration, orbit direction clockwise, axis(0,1,0), 1 revolution, and blend layer 300.
My Behavior setting:
OnTap -> play the animation