fix dts rendering

This commit is contained in:
RandomityGuy 2023-06-01 20:21:55 +05:30
parent fe7696b96e
commit b98eeeb9b3

View file

@ -339,8 +339,8 @@ class DtsObject extends GameObject {
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));
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);
this.boundingCollider.setTransform(this.getTransform());
}
@ -615,7 +615,7 @@ class DtsObject extends GameObject {
i3 = temp;
}
for (index in [i1, i2, i3]) {
for (index in [i3, i2, i1]) {
var vertex = vertices[index];
geometrydata.vertices.push(new Vector(vertex.x, vertex.y, vertex.z));