Jump to content


  • Content Count

  • Joined

  • Last visited

About mattbrand

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Ah ok. I was adding it to the scene, but was not adding it to the physics. Thank you!
  2. Hey all! I have a class that looks like this: export default class Bubble extends Phaser.Physics.Arcade.Sprite { private text:Phaser.GameObjects.Text; private velocity:Phaser.Math.Vector2; private dragging:Boolean; private game:Game; constructor(scene, game, x, y) { ... } I want to set up physics on these objects (the bubbles). I've tried 2 ways to do this. 1. Set up the physics directly in the class constructor itself: this.setCollideWorldBounds(true); this.setVelocity(100, 100); this.setBounce(1); 2. Set up in my game's main scene where I inst
  3. That is exactly it. Thank you again @samme!
  4. I made some serious progress with help from @samme. Still not sure what to do in onDragUpdate(), where I catch the case where I want to have the ball be released: if (xDiff > 20.0 || yDiff > 20.0) But I don't know what to do there in order to disable the ball and re-enable it. You can see my attempts, commented out there. Anyone have suggestions for how to "let go" of the ball right there, but still have the ball be enabled for input events and drag?
  5. I am making a maze game where the player drags their finger to control a ball moving through a maze. I would love to use Phaser physics to block the ball from moving through the walls. Is there a way to do this with Phaser physics and if so, which physics type would be the best suited for this?
  6. I read that as well. I am using 24px. But I am scaling, so perhaps when it scales really small on mobile that's when it gets weird.
  7. In my game I have a form that I built with Orange Games' input plugin (https://github.com/orange-games/phaser-input). The input form working great on computer, but on mobile when you tap into an input field, it zooms in, and becomes impossible to see what you're doing, or go to the next field. I tried using scale prevention with meta tags: <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui"> and: <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=2, minimu
  8. Never mind, figured it out. Had to do with how I was detecting a tap, because a tap was a special action that deleted a selection. I was doing it badly, and it was messing up the accuracy of inputover detection.
  9. A game I made that is playable here: http://gametheorytest.com/gerry/ Has the input events defined as such: this.sprite.events.onInputDown.add(onInputDownTile, this); this.sprite.events.onInputOver.add(onInputOverTile, this); this.sprite.events.onInputOut.add(onInputOutTile, this); On a computer it works great. On a touch device, there seems to be a lack of sensitivity. So sometimes if you tap and move your finger, it doesn't register a touch at all. Sometimes it will register the first touch, but not pick up the onInputOver on the next tile. Any ideas why this would not be accu
  10. Hey all! I am trying to use a custom cursor in my game. It works at first, but when I roll over a Phaser button (in latest Chrome and latest Safari), it switches back to the regular hand cursor. I have tried setting the cursor through CSS: canvas { cursor: url('./assets/images/hand_blue.png'), auto; } And Phaser: game.canvas.style.cursor = "url(assets/images/hand_blue.png), auto"; It fails using both methods, when the input goes over a Phaser button. Any thoughts on this?
  11. Hey all! I add a music track that I want to loop using this code: music = new Phaser.Sound(game, "music", 1, true); It loops correctly everywhere except on IE. Has anyone has this issue? Is the work-around to have an event fire on sound complete?
  12. This is still an issue with Edge 14. Thanks @st0n3vn I put your alternative into place!
  • Create New...