mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-04-27 05:01:38 +00:00
fix dts rendering finally
This commit is contained in:
parent
a39d3137fc
commit
e657aa41df
1 changed files with 6 additions and 6 deletions
|
|
@ -178,8 +178,8 @@ class DtsObject extends GameObject {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!isInstanced) {
|
if (!isInstanced) {
|
||||||
var vertices = mesh.vertices.map(v -> new Vector(v.x, v.y, v.z));
|
var vertices = mesh.vertices.map(v -> new Vector(-v.x, v.y, v.z));
|
||||||
var vertexNormals = mesh.normals.map(v -> new Vector(v.x, v.y, v.z));
|
var vertexNormals = mesh.normals.map(v -> new Vector(-v.x, v.y, v.z));
|
||||||
|
|
||||||
var geometry = this.generateMaterialGeometry(mesh, vertices, vertexNormals);
|
var geometry = this.generateMaterialGeometry(mesh, vertices, vertexNormals);
|
||||||
for (k in 0...geometry.length) {
|
for (k in 0...geometry.length) {
|
||||||
|
|
@ -249,8 +249,8 @@ class DtsObject extends GameObject {
|
||||||
var skinObj = new Object();
|
var skinObj = new Object();
|
||||||
|
|
||||||
if (!isInstanced) {
|
if (!isInstanced) {
|
||||||
var vertices = mesh.vertices.map(v -> new Vector(v.x, v.y, v.z));
|
var vertices = mesh.vertices.map(v -> new Vector(-v.x, v.y, v.z));
|
||||||
var vertexNormals = mesh.normals.map(v -> new Vector(v.x, v.y, v.z));
|
var vertexNormals = mesh.normals.map(v -> new Vector(-v.x, v.y, v.z));
|
||||||
var geometry = this.generateMaterialGeometry(mesh, vertices, vertexNormals);
|
var geometry = this.generateMaterialGeometry(mesh, vertices, vertexNormals);
|
||||||
for (k in 0...geometry.length) {
|
for (k in 0...geometry.length) {
|
||||||
if (geometry[k].vertices.length == 0)
|
if (geometry[k].vertices.length == 0)
|
||||||
|
|
@ -329,7 +329,7 @@ class DtsObject extends GameObject {
|
||||||
rootObject.addChild(this.skinMeshData.geometry);
|
rootObject.addChild(this.skinMeshData.geometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
rootObject.scaleX = -1;
|
// rootObject.scaleX = -1;
|
||||||
|
|
||||||
if (this.level != null && this.isBoundingBoxCollideable) {
|
if (this.level != null && this.isBoundingBoxCollideable) {
|
||||||
var boundthing = new Bounds();
|
var boundthing = new Bounds();
|
||||||
|
|
@ -615,7 +615,7 @@ class DtsObject extends GameObject {
|
||||||
i3 = temp;
|
i3 = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (index in [i3, i2, i1]) {
|
for (index in [i1, i2, i3]) {
|
||||||
var vertex = vertices[index];
|
var vertex = vertices[index];
|
||||||
geometrydata.vertices.push(new Vector(vertex.x, vertex.y, vertex.z));
|
geometrydata.vertices.push(new Vector(vertex.x, vertex.y, vertex.z));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue