mirror of
https://github.com/wassname/phaser.git
synced 2026-10-01 12:21:02 +08:00
Working sprite bounds / vertices regardless of scale or rotation
This commit is contained in:
1 parent
1f8c809f53
commit
c5f6817c4c
21 files changed
+1718
-203
No files matched your search
@@ -72,6 +72,8 @@ module Phaser {
|
||||
this.worldView = new Rectangle(x, y, this.width, this.height);
|
||||
this.cameraView = new Rectangle(x, y, this.width, this.height);
|
||||
|
||||
this.transform.setCache();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -243,8 +245,10 @@ module Phaser {
|
||||
|
||||
this.transform.update();
|
||||
|
||||
this.worldView.x = this.x * this.transform.scrollFactor.x;
|
||||
this.worldView.y = this.y * this.transform.scrollFactor.y;
|
||||
this.worldView.x = (this.x * this.transform.scrollFactor.x) - (this.width * this.transform.origin.x);
|
||||
this.worldView.y = (this.y * this.transform.scrollFactor.y) - (this.height * this.transform.origin.y);
|
||||
//this.worldView.x = this.x * this.transform.scrollFactor.x;
|
||||
//this.worldView.y = this.y * this.transform.scrollFactor.y;
|
||||
this.worldView.width = this.width;
|
||||
this.worldView.height = this.height;
|
||||
|
||||
|
||||
Reference in new issue
Block a user