i want to revive this tipic cause i am dealing with that right now,
the issue i think is in the looping of play animation when the Sprite is created with SpritePackedManager, because it will take all the frames property ( defined in json file ) as if those are a single image with different animation frames, in my case i am using the atlas where i have a bunch of different sprites and some of them have different animations, here is an example:
so every image it has animations ( or have several frames )
but when i use:
enemies[3] = new Sprite( "ene3", enemyPacker)
enemies[3].position =new Vector3(2,-1,0)
enemies[3].cellRef="ene3"
enemies[3].playAnimation( 0, 2, true, 400)
enemies[3] will iterate for explosion at index 0, enebullet at index 1, ene2 at index 2 and ene3 at index 3, but i want to animate or run the frames corresponding to “enebullet” ( in this case ), now i am realizing maybe that is not a feature this Class has.
here is how the sprites are created and what i have in the screen
So now the question is: it is possible, cause the screenshot above the sprite at index 3 iterates over all the sprites but for the defined animation frames.
sorry to revive this but i am restarting with babylon again.
btw i have the project that you can download and build and run to check this issue:
(
1 download
2 execute in a terminal “npm i”
3 and then runm, it in the same terminal execute “npm run start”
)
link to the project: