|
@@ -171,9 +171,13 @@ Scene.prototype._internalMultiPickSprites = function(ray: Ray, predicate?: (spri
|
|
};
|
|
};
|
|
|
|
|
|
Scene.prototype.pickSprite = function(x: number, y: number, predicate?: (sprite: Sprite) => boolean, fastCheck?: boolean, camera?: Camera): Nullable<PickingInfo> {
|
|
Scene.prototype.pickSprite = function(x: number, y: number, predicate?: (sprite: Sprite) => boolean, fastCheck?: boolean, camera?: Camera): Nullable<PickingInfo> {
|
|
- this.createPickingRayInCameraSpaceToRef(x, y, this._tempSpritePickingRay!, camera);
|
|
|
|
|
|
+ if (!this._tempSpritePickingRay) {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.createPickingRayInCameraSpaceToRef(x, y, this._tempSpritePickingRay, camera);
|
|
|
|
|
|
- return this._internalPickSprites(this._tempSpritePickingRay!, predicate, fastCheck, camera);
|
|
|
|
|
|
+ return this._internalPickSprites(this._tempSpritePickingRay, predicate, fastCheck, camera);
|
|
};
|
|
};
|
|
|
|
|
|
Scene.prototype.pickSpriteWithRay = function(ray: Ray, predicate?: (sprite: Sprite) => boolean, fastCheck?: boolean, camera?: Camera): Nullable<PickingInfo> {
|
|
Scene.prototype.pickSpriteWithRay = function(ray: Ray, predicate?: (sprite: Sprite) => boolean, fastCheck?: boolean, camera?: Camera): Nullable<PickingInfo> {
|