var loccnt = 0;
this.inst.y += this.Mazenavdistance;
this.inst.set_bbox_changed();
var collobj = this.runtime.testOverlapSolid(this.inst);
if ( collobj )
{
loccnt += 1;
}
this.inst.y -= (this.Mazenavdistance*2);
this.inst.set_bbox_changed();
var collobj = this.runtime.testOverlapSolid(this.inst);
if ( collobj )
{
loccnt += 2;
}
this.inst.y += this.Mazenavdistance;
this.inst.x += this.Mazenavdistance;
this.inst.set_bbox_changed();
var collobj = this.runtime.testOverlapSolid(this.inst);
if ( collobj )
{
loccnt += 4;
}
this.inst.x -= (this.Mazenavdistance*2);
this.inst.set_bbox_changed();
var collobj = this.runtime.testOverlapSolid(this.inst);
if ( collobj )
{
loccnt += 8;
}
this.inst.x += this.Mazenavdistance;
this.inst.set_bbox_changed();
This is the code i'm using to check if there is a solid object in the up, down, right, and left direction. It seems slow to actually have to move the object to the location and then check to see if its overlapping. I would like to use the
runtime.testAndSelectCanvasPointOverlap function, but every attempt has failed(javascript error). I did look at the mouse plugin, but it didn't help me solve the problem.
Any help