Jump to content

Search the Community

Showing results for tags 'bulletspeed'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hello! I'm having a hell of a time trying figure out how to change Phaser Weapon plugins bullet speed after it's been shot. I also set "weapon.bulletSpeed" negative value, because by default it was going in opposite direction. I attached weapon to a spaceship sprite, but on "weapon.fire()" bullet goes backwards. Weapon definition. addWeapon: function(target) { var weapon; var weapon; weapon = game.add.weapon(100, 'bullet'); weapon.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS; weapon.bulletAngleOffset = 90; weapon.bulletSpeed = 5; weapon.trackSprite(target, (this.ship.height), 0); weapon.trackRotation = true; weapon.fireRate = 200; weapon.bulletRotateToVelocity = false; weapon.onFire.add(function() {this.blastSound.play()},this); return weapon; } this.ship = this.add.sprite(this.world.centerX, this.world.centerY +300, 'ship'); this.ship.anchor.setTo(0.5, 0.5); this.ship.scale.setTo(0.22); this.ship.angle = -90; game.physics.arcade.enable(this.ship); this.ship.body.drag.set(70); this.ship.body.maxVelocity.set(220); this.weapon = this.addWeapon(this.ship); I am trying to set the direction of the bullet to opposite, so I don't have to set bulletSpeed to negative value. change every bullets anchor. change the speed of particular bullet after it's been shot. It would be grate to hear any suggestion. Тhank you in advance.
×
×
  • Create New...