How make a Shadow Puzzle like Silent Hill Shattered Memories ?

I’m currently doing a Game focused on the various puzzles resolution and would like to know how to do something more or less like this here:

[video]Silent Hill Shattered Memories HD: Chemistry Lab † Biology and Astronomy † The Art Studio P14 - YouTube

Thank you for your attention

Can you give a quick description of what the puzzle does? I tried to watch the video but just saw flashlights moving around and no obvious puzzle going on (sorry don’t have the time to watch the whole thing paying close attention).

I am guessing its doing stuff based on what is being lit by the flashlight or not. If so then you simply need to do some checking per-object to see if it is within a light cone. Doing that is fairly easy. If its doing something more complicated like interactions only with shadows cast by other objects inside of the beam that will be a bit harder to do.

First it is just a ray-plane intersection followed by a test to see if the local distance is greater than the cone radius at the distance being traced. If you need some help with this math I will post back later.

The first math part already has a function in BP called “line plane intersection”. The second part you just need to figure out the width of the cone at your distance which is simple dot product and pythagorean math.

If you are feeling math-lazy you could do the monte carlo approach and just shoot a ton of random traces :slight_smile: but I would discourage that. If you need to test something is shadowed you could use a single line trace as the final step after finding the intersection in the cone to be true.

The puzzle works like this, in a painting appears an image in sketches and in the same room has a set of objects casting a shadow on the wall, to solve it is necessary to move the parts up to form a shadow equal to the design.

Thank you, for your attention :wink:

Ah I see, that part shows up at the end of the long video haha.

There isn’t really a puzzle involving any real game logic here that I can see, other than they encoded a phone number based on what some shadows appear to look like. It’s not like the objects even have to be in the correct position, it is merely hinting at how you should position them in order to see the numbers via their shadows projected onto the pieces of paper.

I’m not sure how you go about designing something like this other than by being creative with props and trying to make an arrangement of meshes that look like numbers when projected as shadows. So you need to think about both positive and negative space.