You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example you can use the official animated_fox example. After spawning the first fox, try to spawn the second fox at line 74:
// Fox
commands.spawn(SceneBundle{scene: asset_server.load("models/animated/Fox.glb#Scene0"),
..default()});
commands.spawn(SceneBundle{transform:Transform::from_xyz(50.0,0.0,0.0),scene: asset_server.load("models/animated/Fox.glb#Scene0"),
..default()});
As a result animation for the first fox and second will be broken.
Instance of player if let Ok(mut player) = player.get_single_mut() - will never be acquired.
What went wrong
When I copy the same scene at least second time - animation will be broken.
I want to load gltf/glb file and spawn multiple instances of the same mesh/scene with its own animation.
E.g. gltf file contains ball-mesh + ball-animation, animation is simple just to rotate the ball around its origin.
Next I want to spawn these balls by timer. Each ball should also use the same animation and mesh/scene.
I want to prepare animations and scenes in Blender.
Some thoughts
It is unclear, how instanse of AnimationPlayer is added. My main target would be WASM - so I want to decrease network requests - and I want to have one gltf file with multiple scenes - e.g. scene-player-ball-and-animation + scene-enemy-ball-and-animation, etc.
Why SceneBundle do not spawn animation atomatically from file?
Is it possible to spawn AnimationPlayer manually, e.g. combine SceneBundle from gltf file manually ?
Bevy version
0.10.1
What you did
For example you can use the official animated_fox example. After spawning the first fox, try to spawn the second fox at line 74:
As a result animation for the first fox and second will be broken.
Instance of player
if let Ok(mut player) = player.get_single_mut()
- will never be acquired.What went wrong
When I copy the same scene at least second time - animation will be broken.
I want to load
gltf
/glb
file and spawn multiple instances of the same mesh/scene with its own animation.E.g.
gltf
file containsball-mesh
+ball-animation
, animation is simple just to rotate the ball around its origin.Next I want to spawn these balls by timer. Each ball should also use the same animation and mesh/scene.
I want to prepare animations and scenes in Blender.
Some thoughts
It is unclear, how instanse of AnimationPlayer is added. My main target would be WASM - so I want to decrease network requests - and I want to have one
gltf
file with multiple scenes - e.g.scene-player-ball-and-animation
+scene-enemy-ball-and-animation
, etc.SceneBundle
do not spawn animation atomatically from file?AnimationPlayer
manually, e.g. combineSceneBundle
fromgltf
file manually ?Might be connected with:
#5848
#1802
The text was updated successfully, but these errors were encountered: