Browse Source

Fixing typo

David Catuhe 10 years ago
parent
commit
b78180830f

+ 1 - 1
Babylon/Actions/babylon.actionManager.js

@@ -10,7 +10,7 @@
         }
         ActionEvent.CreateNew = function (source, evt) {
             var scene = source.getScene();
-            return new ActionEvent(source, scene.pointerX, scene.pointerY, scene.meshUnderPointer, event);
+            return new ActionEvent(source, scene.pointerX, scene.pointerY, scene.meshUnderPointer, evt);
         };
 
         ActionEvent.CreateNewFromScene = function (scene, evt) {

+ 1 - 1
Babylon/Actions/babylon.actionManager.ts

@@ -7,7 +7,7 @@
 
         public static CreateNew(source: AbstractMesh, evt?: Event): ActionEvent {
             var scene = source.getScene();
-            return new ActionEvent(source, scene.pointerX, scene.pointerY, scene.meshUnderPointer, event);
+            return new ActionEvent(source, scene.pointerX, scene.pointerY, scene.meshUnderPointer, evt);
         }
 
         public static CreateNewFromScene(scene: Scene, evt: Event): ActionEvent {

+ 10 - 1
babylon.2.0-alpha.debug.js

@@ -12127,6 +12127,7 @@ var BABYLON;
 
            
             newMesh.material = material;
+            newMesh.checkCollisions = source.checkCollisions;
 
            
             if (disposeSource) {
@@ -26377,7 +26378,7 @@ var BABYLON;
         }
         ActionEvent.CreateNew = function (source, evt) {
             var scene = source.getScene();
-            return new ActionEvent(source, scene.pointerX, scene.pointerY, scene.meshUnderPointer, event);
+            return new ActionEvent(source, scene.pointerX, scene.pointerY, scene.meshUnderPointer, evt);
         };
 
         ActionEvent.CreateNewFromScene = function (scene, evt) {
@@ -28900,6 +28901,10 @@ var BABYLON;
 
                 var mesh = abstractMesh;
 
+                if (!mesh.isVisible || !mesh.isEnabled()) {
+                    return false;
+                }
+
                 if (mesh.instances.length > 0) {
                     return false;
                 }
@@ -28936,6 +28941,10 @@ var BABYLON;
                             continue;
                         }
 
+                        if (otherMesh.checkCollisions !== current.checkCollisions) {
+                            continue;
+                        }
+
                         currentPool.push(otherMesh);
                         globalLength--;
 

File diff suppressed because it is too large
+ 3 - 3
babylon.2.0-alpha.js