Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+1)

You made this on your own in 12 hours? It's insane! We also tried to implement our version of a mgnifying glass in Unity and struggled so much.
May I ask you, how did you implement it? It looks so smooth!

I made the magnifier in two steps.

The first step is to determine the collider box. I only used squares for the obstacles and the magnifier so it is relatively easy to determine which part of the colliders should be removed or magnified.

The second step is to display things correctly. I used a camera to render everything to be magnified onto a render texture and display it as a raw image over the screen. Then I scaled it and repositioned it according to the magnifier's magnifying scale and position. Then I used a mask to display only things inside the magnifier.

Thank you for the exhaustive explanation: we opted to duplicate some game objects and resize the copies. One major limitation we encountered is that not everything on the screen can be magnified. 

Once again, great job!