mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 05:58:30 +00:00
The Pointer.camera
property would only be set if there was a viable Game Object in the camera view. Now it is set regardless, to always be the Camera the Pointer interacted with.
This commit is contained in:
parent
f2b7fd0a32
commit
88eb4f4ce9
1 changed files with 6 additions and 1 deletions
|
@ -683,7 +683,7 @@ var InputPlugin = new Class({
|
|||
{
|
||||
var camera = cameras[c];
|
||||
|
||||
// Get a list of all objects that can be seen by the camera below the pointer in the scene and store in 'output' array.
|
||||
// Get a list of all objects that can be seen by the camera below the pointer in the scene and store in 'over' array.
|
||||
// All objects in this array are input enabled, as checked by the hitTest method, so we don't need to check later on as well.
|
||||
var over = this.manager.hitTest(pointer, this._list, camera);
|
||||
|
||||
|
@ -706,6 +706,11 @@ var InputPlugin = new Class({
|
|||
}
|
||||
}
|
||||
|
||||
// If we got this far then there were no Game Objects below the pointer, but it was still over
|
||||
// a camera, so set that the top-most one into the pointer
|
||||
|
||||
pointer.camera = cameras[0];
|
||||
|
||||
return [];
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue