mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +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);
|
||||
|
||||
if (Debug.wireFrame) {
|
||||
material.mainPass.wireframe = true;
|
||||
}
|
||||
|
||||
this.materials.push(material);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1349,8 +1349,9 @@ class Marble extends GameObject {
|
|||
|
||||
var surfaceNormal = new Vector(verts.nx, verts.ny,
|
||||
verts.nz); // surface.normals[surface.indices[i]].transformed3x3(obj.transform).normalized();
|
||||
if (obj is DtsObject)
|
||||
surfaceNormal.multiply(-1);
|
||||
if (obj.correctNormals) {
|
||||
surfaceNormal.load(v.sub(v0).cross(v2.sub(v0)).normalized().multiply(-1));
|
||||
}
|
||||
var surfaceD = -surfaceNormal.dot(v0);
|
||||
|
||||
// If we're going the wrong direction or not going to touch the plane, ignore...
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue