• Content Count

  • Joined

  • Last visited

About adamsko

  • Rank

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
  • Location
    BiaƂystok, Poland
  1. Works. Group has a world as its parent, so this is the way, to bring the group to the top.
  2. Have you tried game.sound.mute = true;
  3. My 'Safedrive' project. Maybe it's not a game, but it's an animated presentation showing dangerous traffic situations (unfortunately not translated to english completely). source code:
  4. I asked similar question here:
  5. Hello. I've noticed that many people have a similar problem. If sprite has physics enabled: how to change its position without interfering with physics system? It's a famous 'fly off the screen' problem. If position is changed, physics system is using new coordinates to continue its work, hence sprite's surprising behavior. Let's say,that sprite is moving and when it's clicked it should move 100px on the right and then continue its movement), maybe with a different speed. How to achieve that? My solution is: sprite.body.moves = false;object.sprite.x += 100;... and then in game's update() function: function update() { sprite.body.reset(sprite.x, sprite.y); sprite.body.velocity.x = 10; // new velocity sprite.body.moves = true;}I understand, that physics system must be after one update, otherwise switching between body.moves = falseand body.moves = truewill not have a chance to work. After that sprite is translated 100px in the right, plus it has new velocity. The question is: is there a proper Phaser way to achieve that without splitting this operation on instructions executed before and after update() function? It's seems like a common need and yet it takes that little extra effort to achieve desired effect
  6. from It sounds exactly as your problem. You're having physics system on, plus you're changing sprite's position and physics system is (probably) using this new posistion for physics calculations. Hence suprising sprite's movement.