mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 12:43:26 +00:00
Merge pull request #6578 from rexrainbow/mesh-setinteractive-improve
Uses current faces to do hit-testing
This commit is contained in:
commit
540fe9ec9a
1 changed files with 3 additions and 3 deletions
|
@ -1165,10 +1165,10 @@ var Mesh = new Class({
|
|||
*/
|
||||
setInteractive: function ()
|
||||
{
|
||||
var faces = this.faces;
|
||||
|
||||
var hitAreaCallback = function (area, x, y)
|
||||
{
|
||||
var faces = this.faces;
|
||||
|
||||
for (var i = 0; i < faces.length; i++)
|
||||
{
|
||||
var face = faces[i];
|
||||
|
@ -1181,7 +1181,7 @@ var Mesh = new Class({
|
|||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
}.bind(this);
|
||||
|
||||
this.scene.sys.input.enable(this, hitAreaCallback);
|
||||
|
||||
|
|
Loading…
Reference in a new issue