mirror of
https://github.com/wassname/phaser.git
synced 2026-07-17 11:31:30 +08:00
Objects that are 'fixedToCamera' are now still correctly placed even if the camera is scaled (#512)
This commit is contained in:
@@ -308,8 +308,8 @@ Phaser.Sprite.prototype.postUpdate = function() {
|
||||
// Fixed to Camera?
|
||||
if (this._cache[7] === 1)
|
||||
{
|
||||
this.position.x = this.game.camera.view.x + this.cameraOffset.x;
|
||||
this.position.y = this.game.camera.view.y + this.cameraOffset.y;
|
||||
this.position.x = (this.game.camera.view.x + this.cameraOffset.x) / this.game.camera.scale.x;
|
||||
this.position.y = (this.game.camera.view.y + this.cameraOffset.y) / this.game.camera.scale.y;
|
||||
}
|
||||
|
||||
// Update any Children
|
||||
|
||||
Reference in New Issue
Block a user