The animation example compiles and runs but continuesly logs the following error:
[ERROR][amethyst_animation::systems::control] Failed to acquire animated component.
Is the component you are trying to animate present on the target entity: Entity(1, Generation(1))
The same error occurs when running the example for tag v0.13.2.
animation example with vulkan backend (--features vulkan)No logged errors and something animated in the opened window.
Static image in the window and the above error in the console.
64-bit Arch linuxrollingmasterSame here. When I run this example, it even freezes my whole DE.
I also saw this issue. I fixed it by adding .with(RestState::new(Transform::default())) to line 87 of examples/animation/main.rs.
.with(Transform::default()) also works, but it's less explicit.
The documentation doesn't make it clear that this is required (and in fact, the book points to _this_ example for how to implement animations). I'm not actually certain why this is required (I _just_ started using Amethyst a couple hours ago). I just inferred that this was needed by looking at the start_animation function from amethyst_animation/src/systems/control.rs (where this error originates from).
It looks like the rest state is only used in amethyst_animation/src/systems/sampling.rs in fn process_sampler. Even there it's only used to support EndControl::Normal. To me it's a little weird to require an additional component for each thing that's animated even if EndControl::Stay would do the job just fine.
Anyways, thanks to everyone who's working on Amethyst. It looks neat!
Got same error on Windows 10 2004 (build19041.572)
Amethyst has been built from d31c82cca90e0167ff7bf29fec171ca0fa899ce0 commit.
Run with cargo run --example animation --features vulkan
rustc: 1.49.0-nightly (ffa2e7ae8 2020-10-24)
EDIT:
Tried @WimbledonLabs workaround and it works. Thanx!
Most helpful comment
I also saw this issue. I fixed it by adding
.with(RestState::new(Transform::default()))to line 87 ofexamples/animation/main.rs..with(Transform::default())also works, but it's less explicit.The documentation doesn't make it clear that this is required (and in fact, the book points to _this_ example for how to implement animations). I'm not actually certain why this is required (I _just_ started using Amethyst a couple hours ago). I just inferred that this was needed by looking at the
start_animationfunction fromamethyst_animation/src/systems/control.rs(where this error originates from).It looks like the rest state is only used in
amethyst_animation/src/systems/sampling.rsinfn process_sampler. Even there it's only used to supportEndControl::Normal. To me it's a little weird to require an additional component for each thing that's animated even ifEndControl::Staywould do the job just fine.Anyways, thanks to everyone who's working on Amethyst. It looks neat!