Weapon#trackOffset

trackOffset : Phaser.Point

The Track Offset is a Point object that allows you to specify a pixel offset that bullets use
when launching from a tracked Sprite or Pointer. For example if you've got a bullet that is 2x2 pixels
in size, but you're tracking a Sprite that is 32x32, then you can set trackOffset.x = 16 to have
the bullet launched from the center of the Sprite.

Source code: plugins/weapon/WeaponPlugin.js (Line 360)
doc_phaser
2017-02-14 11:20:00
Comments
Leave a Comment

Please login to continue.