Skip to content

Conversation

janhohenheim
Copy link
Member

Objective

  • The current name and docs tell you this is the animation player entity. But it's not necessarily! When adding an event via AnimationClip::add_event_to_target, that entity actually points to the AnimationTargetId, not the animation player!
    • This just caused some major confusion for me while debugging a system that was supposed to play a sound effect from a specific bone (namely a footstep from the foot).

Solution

  • Rename the field to target
  • Change the docs to mention the nuance

Testing

  • Verified behavior in a test scene

@janhohenheim janhohenheim added C-Docs An addition or correction to our documentation M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 18, 2025
@janhohenheim janhohenheim added this to the 0.18 milestone Oct 18, 2025
@janhohenheim janhohenheim added the A-Animation Make things move and change over time label Oct 18, 2025
@Sirmadeira
Copy link

I approved of this

@janhohenheim
Copy link
Member Author

Then leave a review approval ;)

@Sirmadeira
Copy link

@janhohenheim Dont you sass me hahaha

@janhohenheim
Copy link
Member Author

Hehe you know me ;*

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 19, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Oct 19, 2025
Merged via the queue into bevyengine:main with commit a6da26a Oct 19, 2025
38 checks passed
mate-h pushed a commit to mate-h/bevy that referenced this pull request Oct 22, 2025
…misleading docs surrounding it (bevyengine#21593)

# Objective

- The current name and docs tell you this is the animation player
entity. But it's not necessarily! When adding an event via
`AnimationClip::add_event_to_target`, that entity actually points to the
`AnimationTargetId`, not the animation player!
- This just caused some major confusion for me while debugging a system
that was supposed to play a sound effect from a specific bone (namely a
footstep from the foot).

## Solution

- Rename the field to `target`
- Change the docs to mention the nuance

## Testing

- Verified behavior in a test scene
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-Docs An addition or correction to our documentation D-Straightforward Simple bug fixes and API improvements, docs, test and examples M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants