mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-04-26 12:41:40 +00:00
fix trapdoor collision
This commit is contained in:
parent
e72e28def5
commit
b112004949
2 changed files with 7 additions and 2 deletions
|
|
@ -532,6 +532,10 @@ class DtsObject extends GameObject {
|
||||||
|
|
||||||
postProcessMaterial(matName, material);
|
postProcessMaterial(matName, material);
|
||||||
|
|
||||||
|
if (Debug.wireFrame) {
|
||||||
|
material.mainPass.wireframe = true;
|
||||||
|
}
|
||||||
|
|
||||||
this.materials.push(material);
|
this.materials.push(material);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1349,8 +1349,9 @@ class Marble extends GameObject {
|
||||||
|
|
||||||
var surfaceNormal = new Vector(verts.nx, verts.ny,
|
var surfaceNormal = new Vector(verts.nx, verts.ny,
|
||||||
verts.nz); // surface.normals[surface.indices[i]].transformed3x3(obj.transform).normalized();
|
verts.nz); // surface.normals[surface.indices[i]].transformed3x3(obj.transform).normalized();
|
||||||
if (obj is DtsObject)
|
if (obj.correctNormals) {
|
||||||
surfaceNormal.multiply(-1);
|
surfaceNormal.load(v.sub(v0).cross(v2.sub(v0)).normalized().multiply(-1));
|
||||||
|
}
|
||||||
var surfaceD = -surfaceNormal.dot(v0);
|
var surfaceD = -surfaceNormal.dot(v0);
|
||||||
|
|
||||||
// If we're going the wrong direction or not going to touch the plane, ignore...
|
// If we're going the wrong direction or not going to touch the plane, ignore...
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue