diff options
Diffstat (limited to 'engine/components/BoundingBox.ts')
-rw-r--r-- | engine/components/BoundingBox.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/engine/components/BoundingBox.ts b/engine/components/BoundingBox.ts index 921feb9..f01ae9b 100644 --- a/engine/components/BoundingBox.ts +++ b/engine/components/BoundingBox.ts @@ -16,6 +16,7 @@ export class BoundingBox extends Component { } public isCollidingWith(box: BoundingBox): boolean { + // optimization; when neither rotates just check if they overlap if (this.rotation == 0 && box.rotation == 0) { const thisTopLeft = this.getTopLeft(); const thisBottomRight = this.getBottomRight(); |