Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

spriteBatch not updating body position


Recommended Posts



It looks like the spriteBatch group is not updating the body of a sprite correctly.

Is this expected behaviour?





    this.gr.enableBody = true;
    this.gr.physicsBodyType = Phaser.Physics.ARCADE;
    this.s=new Phaser.Sprite(this.game,0,0,'atlas','player_01.png')
and in the state update:
the body is stuck at 0,0
phaser 2.1.0
regards, Wouter


Link to comment
Share on other sites

If i understand correct:

When a sprite is put on the screen the gpu makes a drawcall.

If you have one texture used by many sprites you can reduce the drawcalls made by the gpu using a spritebatch.


I am not sure if a sprite in a spritebatch is allowed to have a body but i guess i can.


When using a 'normal' group the body of a sprite is updated, not with a spritebatch (on my side anyway)

Maybe i am doing something wrong.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...