Skip to content

Two or more AnimationPlayer (3D) #5564

Answered by thmsgntz
thmsgntz asked this question in Q&A
Discussion options

You must be logged in to vote

EDIT : see @pinkponk 's answer below


Maybe I can clarify my question: from what I understood:

  1. When loaded a scene (asset_server.load(&scene_path)) from a gltf file, a new AnimationPlayer is created.

  2. If I load two scenes, one for creature 1 and one for creature 2 (different GLTF files, so different animations), two AnimationPlayers will exist in the World

  3. To update the animation of creature 1, I need to query its AnimationPlayer:

fn start_animation(
    mut player: Query<&mut AnimationPlayer>
    [...]
) {...}
  1. But can I know if this AnimationPlayer is the one from creature 1 or 2? Is there a way to mark them?

  2. If I load an AnimationClip from creature 1 in the AnimationPlayer of…

Replies: 3 comments 13 replies

Comment options

You must be logged in to vote
7 replies
@thmsgntz
Comment options

@pinkponk
Comment options

@thmsgntz
Comment options

@pinkponk
Comment options

@Tobias112358
Comment options

Answer selected by thmsgntz
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@thmsgntz
Comment options

@SnowdenWintermute
Comment options

@rajsahae
Comment options

@rajsahae
Comment options

@rajsahae
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
8 participants