BlueGit

timfa frameworkv3

fix colliders

timfa Tim · pushed by timfa

Authored 2022-10-20 · 4 years ago

Hash
baf9f95e19bdb23a733588a1529ff35da93dd097
Parent
88b72f8c
1 file changed +1 −1
framework/engine/objectComponents/collider.js +1 −1
@@ -87,7 +87,7 @@ class Collider
87 87
88 88 if (this.gameObject.scene.activeObjects[i] != this && this.gameObject.scene.activeObjects[i].collider.enabled)
89 89 {
90 if (this.widestDiagonal + this.gameObject.scene.activeObjects[i].collider.widestDiagonal > this.gameObject.transform.position.distanceTo(this.gameObject.scene.activeObjects[i].transform.position))
90 if (this.widestDiagonal + this.gameObject.scene.activeObjects[i].collider.widestDiagonal < this.gameObject.transform.position.distanceTo(this.gameObject.scene.activeObjects[i].transform.position))
91 91 continue;
92 92
93 93 var hit = false;
@@ -87,7 +87,7 @@ class Collider
87
87
88 if (this.gameObject.scene.activeObjects[i] != this && this.gameObject.scene.activeObjects[i].collider.enabled)
88 if (this.gameObject.scene.activeObjects[i] != this && this.gameObject.scene.activeObjects[i].collider.enabled)
89 {
89 {
90 if (this.widestDiagonal + this.gameObject.scene.activeObjects[i].collider.widestDiagonal > this.gameObject.transform.position.distanceTo(this.gameObject.scene.activeObjects[i].transform.position))
90 if (this.widestDiagonal + this.gameObject.scene.activeObjects[i].collider.widestDiagonal < this.gameObject.transform.position.distanceTo(this.gameObject.scene.activeObjects[i].transform.position))
91 continue;
91 continue;
92
92
93 var hit = false;
93 var hit = false;