Hi Michael,
Thank you for the tips. Today I tried your last recommendation but it didn't work. Let me list my process.
I have got both walk and run animations as one animation in .fbx file.
Then imported it to Blender.
First I exported T-Pose of the entity and then exported animation in .usdz format.
Started using T-Pose rabbit entity in RCP
Then import that usdz animation in RCP's AnimationLibraryComponent .
On the code side (as you suggested) I did clipping the timeline into two small animations as "walkClip" and "runClip". And pass those clips in order to construct a BlendTreeeAnimation.
if let rabbit = await RabbitBuilder.loadRabbit() {
rabbit.components.set(RabbitWalkerComponent(elapsed: 0, speed: rabbitSpeed))
RabbitWalker.entity = rabbit
content.add(rabbit)
let anims = rabbit.availableAnimations
// ── Slice a single combined clip into walk and run ─────────────
// Walk = keyframes 0–18, Run = keyframes 19–29.
// trimStart / trimEnd are in seconds, so we need the frame rate.
// Read the duration printed above: if 30 frames total → fps = 30/duration.
let fps: Double = 31.0 // ← adjust if the print shows a different rate
guard let source = anims.first else { return }
let walkClip = AnimationView(source: source.definition,
name: "walkClip",
repeatMode: .repeat,
fillMode: [],
trimStart: 0.0,
trimEnd: 18.0 / fps,
trimDuration: nil,
offset: 0,
delay: 0,
speed: 1.0)
let runClip = AnimationView(source: source.definition,
name: "runClip",
repeatMode: .repeat,
fillMode: [],
trimStart: 19.0 / fps,
trimEnd: 29.0 / fps,
trimDuration: nil,
offset: 0,
delay: 0,
speed: 1.0)
guard let walkRes = try? AnimationResource.generate(with: walkClip),
let runRes = try? AnimationResource.generate(with: runClip) else {
print("⚠️ Failed to generate walk/run clips")
return
}
RabbitWalker.walkAnim = walkRes
RabbitWalker.runAnim = runRes
}
Blender;
RCP
But I still get the same error. Probably I will open a ticket with a sample project.
Regards,
Hakan