Amethyst: [BUG] `animation` example failing

Created on 5 Feb 2020  路  3Comments  路  Source: amethyst/amethyst

Description

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.

Reproduction Steps

  1. Clone current master branch.
  2. Compile and run the animation example with vulkan backend (--features vulkan)
  3. See error

What You Expected to Happen

No logged errors and something animated in the opened window.

What Actually Happened

Static image in the window and the above error in the console.

Your Environment

  1. Operating System: 64-bit Arch linux
  2. Operating System Version rolling
  3. Version of Amethyst master
needs triage bug

Most helpful comment

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!

All 3 comments

Same 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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cloudfreexiao picture cloudfreexiao  路  3Comments

Emiller88 picture Emiller88  路  3Comments

sunjay picture sunjay  路  3Comments

aschuhardt picture aschuhardt  路  5Comments

KSXGitHub picture KSXGitHub  路  4Comments