• Content count

  • Joined

  • Last visited

  • Days Won


samme last won the day on October 22

samme had the most liked content!

About samme

  • Rank
    Advanced Member

Contact Methods

  • Website URL
  1. Physics with touch to move player

    You can try sprite.input.stopDrag(pointer);
  2. You could try using a dummy sprite parent and alter its position (maybe pivot as well) instead.
  3. You can try resetting `pivot` to zero and setting `position` (to compensate) between each step.
  4. Are you using `obj.pivot` or just `object.anchor`?
  5. Body vs Sprite (ARCADE physics)

    You don't have to resize the body after scaling the sprite, that happens automatically: examples/v2/arcade-physics/body-scale You only need to do it to if you want a bounding box different from the sprite texture frame.
  6. Oh, that's a syntax problem. Weird. Does it not like let?
  7. Physics with touch to move player

    Some jitter during drag :/
  8. That may be fixed in the newest Phaser CE. But you can try let menuState = Object.assign(new Phaser.State(), { preload: function () {}, create: function () {} });
  9. Body vs Sprite (ARCADE physics)

    Don't change the JSON data. Use sprite.scale, sprite.width, or sprite.height.
  10. Group and foreach
  11. Tween duration precision?

    It's possible that time deltas smaller than the frame interval (16ms) are lost when the tween loops back to the beginning. But i'm not sure. You can just update the animation (or whatever) yourself using the Phaser.Sound#currentTime value.
  12. Phaser tilemap draw position question

    Oops I meant debug.cameraInfo.
  13. How to load sprites on phaser based on database data

    First, you may find a pattern like this a little simpler: function ionViewDidLoad() { var app = this; // … = new Phaser.Game(window.innerWidth, window.innerHeight, Phaser.AUTO, 'game', { init: function () { = app; }, preload: function () {/* … */}, create: function () {/* … */}, update: function () {/* … */}, render: function () {/* … */} }); } Second, profileData.subscribe probably hasn't received its callback by the time preload is run. If you want Phaser to wait for the profile data, you might start the game state only from the subscribe callback.
  14. Using several Tiled map on huge world

    It has to jump because the scroll position has to be accurate during each frame. You should tween scrollFactorY from 0 to 1 for a gradual change.
  15. problem with .damage oneshots

    Remember each argument to the collide/overlap callbacks is always one sprite, e.g., one bullet, player, zombie.