Search the Community

Showing results for tags 'xy'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 2 results

  1. Hi all, Currently I try to rotate the game 90 degree to meet the portrait mode for my [landscape] game, I used other's solution to rotate all display object by, ; and Phaser.World.prototype.displayObjectUpdateTransform = function() { if(! { this.x = +; this.y =; this.rotation = Phaser.Math.degToRad(Phaser.Math.wrapAngle(90)); } else { this.x =; this.y =; this.rotation = 0; }; }; now all display object are rotated, but the pointer are not rotate, so when I want to do something with activePointer like: calculation with the mouse position drag and drop logic the x, y are reversed. So I want to know is there any good solution to switch the x, y of the pointer, thx.
  2. How do I simply set an x, y coordinate on an arcade body? Specifically, I'm trying to set the starting position of a player after the sprite is created and physics enabled, but before there is a physics update. When I do so as below, the body ignores the new setting and opens with the sprite at the initial dummy coordinates. I have arranged my code like this: // Map inherits from Tilemap and creates all of the layersvar map = new Map(, 'map'); // Player inherits from Sprite// 0, 0 is the initial coordinate// the constructor enables physics on the bodyvar player = new Player(, 0, 0, 1);// This is so that map can insert the player into the proper// group index and;in Map I have:function addPlayer(player){, this.PLAYER_LAYER);player.body.moves = false; // <-- doesn't seem to matter whether this is set or notplayer.body.x = this.START_X;player.body.y = this.START_Y;player.body.reset(this.START_X,this.START_Y); // <-- doesn't matter whether I set it this way or not}How can I move the sprite to the proper starting coordinates?