DanielPhaser

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. I am making a platformer game which I have implemented a weapon fire method to shoot some projectiles. I find that I am unable to fire these projectiles along the X axis rather than the Y. Here is a that section of the code within the create function: weapon = this.game.add.weapon(1, 'bullet'); weapon.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS; and the code within create for the bullet: if(this.cursors.down.isDown){ weapon.bulletAngleOffset = 90; weapon.bulletSpeed = 300; weapon.x = this.fNobleRanger.x; weapon.y = this.fNobleRanger.y; weapon.fire(); } The projectile is firing from my desired sprite, however the projectile shoots up and then falls back down. I want to shoot the projectile along the X axis instead. Any tips? I am silly. Found out about fireAngle, but to further this question: is it possible to have this item not be affected by game physic gravity?