bevyengine / bevyengine/bevy

Make AnimationPlayer a relationship

Open
#18,920 6 comments 6 reactions 0 assignees View on GitHub
A-Animation A-ECS C-Feature D-Modest S-Ready-For-Implementation X-Uncontroversial
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

Dealing with animation in practice is very verbose. Usually, people spawn glTF scenes that they want to animate. However, the [animation player is buried somewhere in the hierarchy!](https://github.com/bevyengine/bevy/issues/11763) This means that lots of users set up boilerplate observers that add some kind of manual `AnimationPlayerLink(Entity)` to the scene root

## What solution would you like?

Make a scene's animation players a 1:n relationship

## What alternative(s) have you considered?

- keep the manual boilerplate
- introduce a new system parameter that fetches the right animation players
- Move the animation players up the hierarchy into a vector at the scene root
- Rethink how the animation player API / hierarchy works in general
- Add a convenience API to scenes with only a single animation player

Contributor guide

Open the contributing guide

Research direction

The issue does not name files, tests, or an entry point. Start by tracing how glTF scenes expose AnimationPlayer entities and how hierarchy relationships are represented, then compare the proposed 1:n relationship with the listed alternatives. Done means agreeing on a concrete API and implementing it with coverage for scenes containing one or multiple animation players.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.