implement hitbox

This commit is contained in:
LabyStudio
2022-02-13 05:30:18 +01:00
parent 6e46e5e838
commit 82ea74085b
5 changed files with 98 additions and 7 deletions
+11
View File
@@ -21,6 +21,17 @@ window.BoundingBox = class {
this.maxZ = maxZ;
}
width() {
return this.maxX - this.minX;
}
height() {
return this.maxY - this.minY;
}
depth() {
return this.maxZ - this.minZ;
}
/**
* Copy the current bounding box object