Jump to content

Weird behavior with scale and anchor


nounoursheureux
 Share

Recommended Posts

Hello :)

It is the first time I use Phaser, and I have a problem with scale and anchor .

 

Here is the create function:

game.physics.startSystem(Phaser.Physics.ARCADE);player = game.add.sprite(32,game.world.height - 150, 'dude');game.physics.arcade.enable(player);player.body.collideWorldBounds = true;player.scale.setTo(0.5,0.5);player.anchor.setTo(0.5,0.5);

The update function is empty.

When I execute this code, the player moves toward the bottom right corner,whereas I didn't told him to move.

I don't understand why this is happening :/

Thanks for your help :)

Link to comment
Share on other sites

  • 1 month later...
 Share

  • Recently Browsing   0 members

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