diff --git a/src/DtsObject.hx b/src/DtsObject.hx index a0bb867c..a6ca9294 100644 --- a/src/DtsObject.hx +++ b/src/DtsObject.hx @@ -332,6 +332,12 @@ class DtsObject extends GameObject { if (this.level != null && this.isBoundingBoxCollideable) { var boundthing = new Bounds(); + for (mesh in this.dts.meshes) { + if (mesh == null) + continue; + for (pt in mesh.vertices) + boundthing.addPoint(new h3d.col.Point(-pt.x, pt.y, pt.z)); + } boundthing.addPoint(new h3d.col.Point(this.dts.bounds.minX, this.dts.bounds.minY, this.dts.bounds.minZ)); boundthing.addPoint(new h3d.col.Point(this.dts.bounds.maxX, this.dts.bounds.maxY, this.dts.bounds.maxZ)); this.boundingCollider = new BoxCollisionEntity(boundthing, cast this);