0 Favourites

Image Masking

This forum is currently in read-only mode.
  • Is it possible to mask off part of an image, and at the same time change the collision mask so the part that is visible can still be collided with, while the part that is now invisible can not?

    Or at the very least is there a way to create the same effect?

    P.S. Trying to do this during run time.

  • That is pretty difficult unfortunately. Do you need the objects to collide like solids or just perform events when they touch?

    If it's the latter, I'd say check for a collision with the masked object, and then check to make sure that it's not overlapping with the mask itself. That way you know you're touching the object where it's visible (might need some tweaks on overlapping at offset and etc to get it to work in every case though).

  • Ah, I understand. This should be a lot simpler now. Thanks.

    Also this should have been my first question, but how exactly do I use the mask effect? When I apply the mask I have this giant black void around it and I get this permanent image echo effect for anything that moves around in the black.

    And is there a way to invert the mask?

    Edit: If I make the mask dynamic (having it move) it acts like a paint brush, undoing the rest of the mask. (that's not really my goal)

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Sounds like you want the erase effect instead. Erase reveals things on the layers underneath, not used the mask effect myself yet so I can't say how it works.

  • Awesome. It works perfectly.

    Thank you <img src="smileys/smiley36.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)