mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-12-29 19:32:19 +00:00
fix dts rendering finally
This commit is contained in:
parent
82cdf9b9b6
commit
7450625a2f
1 changed files with 6 additions and 6 deletions
|
|
@ -187,8 +187,8 @@ class DtsObject extends GameObject {
|
|||
continue;
|
||||
|
||||
if (!isInstanced) {
|
||||
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 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 geometry = this.generateMaterialGeometry(mesh, vertices, vertexNormals);
|
||||
for (k in 0...geometry.length) {
|
||||
|
|
@ -258,8 +258,8 @@ class DtsObject extends GameObject {
|
|||
var skinObj = new Object();
|
||||
|
||||
if (!isInstanced) {
|
||||
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 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 geometry = this.generateMaterialGeometry(mesh, vertices, vertexNormals);
|
||||
for (k in 0...geometry.length) {
|
||||
if (geometry[k].vertices.length == 0)
|
||||
|
|
@ -338,7 +338,7 @@ class DtsObject extends GameObject {
|
|||
rootObject.addChild(this.skinMeshData.geometry);
|
||||
}
|
||||
|
||||
rootObject.scaleX = -1;
|
||||
// rootObject.scaleX = -1;
|
||||
|
||||
if (this.level != null && this.isBoundingBoxCollideable) {
|
||||
var boundthing = new Bounds();
|
||||
|
|
@ -625,7 +625,7 @@ class DtsObject extends GameObject {
|
|||
|
||||
var geometrydata = materialGeometry[materialIndex];
|
||||
|
||||
for (index in [i3, i2, i1]) {
|
||||
for (index in [i1, i2, i3]) {
|
||||
var vertex = vertices[index];
|
||||
geometrydata.vertices.push(new Vector(vertex.x, vertex.y, vertex.z));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue