Challenging! How do I make a functioning mirror?

0 favourites
  • 3 posts
  • Hi, currently trying to take on a big challenge, as I know this is not something that most developers want to even try in general ;p

    I'm trying to make a functioning mirror. I think I'm on the right path but I fail to i.e. successfully grasp the concept of Construct's included blend modes where Source and Destination are somewhat confusing.

    As you can see in the added pictures, I added a bathroom where a smaller mirror sprite of my player is supposed to be clipped in the mirror. I can do this by simply editing the sprite and letting it exist between two values, but I prefer to understand how to do it with masking as it may help a lot with future projects.

    So far I have a few layers which include the player mirror image, the background of mirror, and a black masked area where I want the player mirror image to appear (and disappear outside of it). How should I follow up on this now? I messed around for a good hour or two but I can't figure it out.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just wanted to inform those who stumble upon this post, I did a temporary work-around to make something work anyway. I did this by doing the following:

    - First visually look at what seems about right distance and size-wise for the mirror image.

    - Cut a hole in the image where the mirror is

    - Made a copy of the player and called it Player_Mirror, and placed it with an extra background layer behind the hole to simulate looking in a mirror. Pretend it's like a window where you have to visually fool the player that they look in a mirror by having a double of your character following every move the character makes.


    - Globally made some settings just like you would for a player controller that tell the Player_Mirror that if Player = mirrored, Player_Mirror needs to be mirrored as well. If Player is flipped, Player_Mirror needs to be flipped as well etc.

    - Calculate the difference between the X and Y of the Player and the Player_Mirror object, and use that difference to set the following:

    -Whenever the player is moving to the mouse.X and mouse Y, set the animation of the Player_Mirror object to the same animation as the Player object.

    -Then, also let the Player_Mirror move to said point, but add or substract the calculated difference between the Player and Player_Mirror object to make sure the objects move exactly the same distance.


    - In local event sheet set the Player_Mirror object to the right position and size as you decided fits

    - Use the pin behavior to pin the Player_Mirror object to the Player Object so they have the same distance.


    - Last but not least, edit the animations where needed so they actually look mirrored.

  • Well, if you want to make a real mirror in a 3D game, you need to give all your graphics a "reverse" side. Say, if your character is facing the player, the mirror should show the character's back, not his face..

    If you just want to make a snapshot of a part of the scene, you can use Drawing Canvas, I did something similar recently:

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