Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animation Player being placed on wrong entity when loading certain GLTF files #4416

Closed
LoopyAshy opened this issue Apr 4, 2022 · 1 comment
Labels
A-Animation Make things move and change over time C-Bug An unexpected or incorrect behavior
Milestone

Comments

@LoopyAshy
Copy link
Contributor

Bevy version

28d0a40

Operating system & version

Windows 10,

What you did

I loaded one of the many gltf models I had to simply see its performance and how easy it was to achieve in bevy.

What you expected to happen

I expected the animation to load, placing the AnimationPlayer on the base skeleton node and running perfectly considering it runs flawlessly in all other gltf viewers I have tried it with.

What actually happened

the AnimationPlayer was placed on one of the meshes and as a result none of the animations could run due to the EntityPath being unrelated.

Additional information

I ended up spending a lot of time debugging this problem and quickly discovered it is caused due to being placed on a incorrect entity when generated in the gltf loader.

Attached is the model,
Drake.zip
my console logs (I pause the animation as soon as it loads to not spam the console)
log.txt
I added extra prints in the animation crate to try and figure out what was going wrong.
image

@LoopyAshy LoopyAshy added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Apr 4, 2022
@cart cart added this to the Bevy 0.7 milestone Apr 4, 2022
@mockersf
Copy link
Member

mockersf commented Apr 4, 2022

I have a fix almost ready, waiting for another PR (#4396) to be merged 👍

root cause is that your scene has several root nodes

@alice-i-cecile alice-i-cecile added A-Animation Make things move and change over time and removed S-Needs-Triage This issue needs to be labelled labels Apr 4, 2022
@bors bors bot closed this as completed in 30878e3 Apr 5, 2022
aevyrie pushed a commit to aevyrie/bevy that referenced this issue Jun 7, 2022
…tion roots (bevyengine#4417)

# Objective

- Fix bevyengine#4416 
- The scene has two root nodes, with the second one being the animation root

## Solution

- Check all scene root nodes, and add the `AnimationPlayer` component to nodes that are also animation roots
ItsDoot pushed a commit to ItsDoot/bevy that referenced this issue Feb 1, 2023
…tion roots (bevyengine#4417)

# Objective

- Fix bevyengine#4416 
- The scene has two root nodes, with the second one being the animation root

## Solution

- Check all scene root nodes, and add the `AnimationPlayer` component to nodes that are also animation roots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Animation Make things move and change over time C-Bug An unexpected or incorrect behavior
Projects
None yet
4 participants