提交 848b4036 编写于 作者: M Mr.doob

Merging with @NINE78 branch.

上级 ece93dfe
......@@ -152,7 +152,7 @@ THREE.CollisionSystem.prototype.rayMesh = function( r, me ) {
var p3 = face instanceof THREE.Face4 ? me.mesh.geometry.vertices[ face.d ].position : null;
if (face instanceof THREE.Face3) {
var nd = this.rayTriangle( rt, p0, p1, p2, d, this.collisionNormal, me.mesh.doubleSided );
var nd = this.rayTriangle( rt, p0, p1, p2, d, this.collisionNormal, me.mesh );
if( nd < d ) {
......@@ -167,7 +167,7 @@ THREE.CollisionSystem.prototype.rayMesh = function( r, me ) {
else if (face instanceof THREE.Face4) {
var nd = this.rayTriangle( rt, p0, p1, p3, d, this.collisionNormal, me.mesh.doubleSided );
var nd = this.rayTriangle( rt, p0, p1, p3, d, this.collisionNormal, me.mesh );
if( nd < d ) {
......@@ -178,7 +178,7 @@ THREE.CollisionSystem.prototype.rayMesh = function( r, me ) {
}
nd = this.rayTriangle( rt, p1, p2, p3, d, this.collisionNormal, me.mesh.doubleSided );
nd = this.rayTriangle( rt, p1, p2, p3, d, this.collisionNormal, me.mesh );
if( nd < d ) {
......@@ -197,7 +197,7 @@ THREE.CollisionSystem.prototype.rayMesh = function( r, me ) {
};
THREE.CollisionSystem.prototype.rayTriangle = function( ray, p0, p1, p2, mind, n, doubleSided ) {
THREE.CollisionSystem.prototype.rayTriangle = function( ray, p0, p1, p2, mind, n, mesh ) {
var e1 = THREE.CollisionSystem.__v1,
e2 = THREE.CollisionSystem.__v2;
......@@ -213,7 +213,7 @@ THREE.CollisionSystem.prototype.rayTriangle = function( ray, p0, p1, p2, mind, n
var dot = n.dot( ray.direction );
if ( !( dot < 0 ) ) {
if ( doubleSided ) {
if ( mesh.doubleSided || mesh.flipSided ) {
n.multiplyScalar (-1.0);
dot *= -1.0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册