فهرست منبع

Update babylon.abstractMesh.ts

aWeirdo 8 سال پیش
والد
کامیت
04c700c2f6
1فایلهای تغییر یافته به همراه11 افزوده شده و 1 حذف شده
  1. 11 1
      src/Mesh/babylon.abstractMesh.ts

+ 11 - 1
src/Mesh/babylon.abstractMesh.ts

@@ -164,12 +164,22 @@
 
         // Collisions
         private _checkCollisions = false;
+        private _collisionGroup = -1;
+        private _collisionMask = -1;
         public ellipsoid = new Vector3(0.5, 1, 0.5);
         public ellipsoidOffset = new Vector3(0, 0, 0);
         private _collider = new Collider();
         private _oldPositionForCollisions = new Vector3(0, 0, 0);
         private _diffPositionForCollisions = new Vector3(0, 0, 0);
         private _newPositionForCollisions = new Vector3(0, 0, 0);
+        
+        public set setCollisionGroup(mask: number) {
+            this._collisionGroup = !isNaN(mask) ? mask : -1;
+        }
+        
+        public set setCollisionMask(mask: number) {
+            this._collisionMask = !isNaN(mask) ? mask : -1;
+        }
 
         // Attach to bone
         private _meshToBoneReferal: AbstractMesh;
@@ -1674,4 +1684,4 @@
         } 
 
     }
-}
+}