Hi,
Is there a way to disable an entity’s Mask to avoid clissions, i tried : Entity.collidable = false & Entity.visible = false.
Both of them didn’t seem to work.
Thank You.
Hi,
Is there a way to disable an entity’s Mask to avoid clissions, i tried : Entity.collidable = false & Entity.visible = false.
Both of them didn’t seem to work.
Thank You.
Hi,
I’m back with good news, i managed to find a solution to get the job done :
public function setEntityAlpha(myEntity:Entity, alpha:uint = 0):void
{
var pixMask:Pixelmask = myEntity.mask as Pixelmask;
var data:BitmapData = pixMask.data;
(alpha == 0) ? pixMask.width = 0 : pixMask.width = pixMask.data.width;
}
Have Fun.
How are you performing the collision checks? I believe
myEntity.collidable = false;
should disable collision checks against that entity.
I’m checking collisions with the mouse like this :
override public function update():void
{
super.update();
_mouseover = collidePoint(x, y , world.mouseX, world.mouseY);
if (_mouseover) {
if (Input.mouseReleased) clickMenuButton();
}
}
I did try the Entity.collidable = false, but it didn’t work out.