hey there, welcome to mix and jam a channel about game development. Experimentation today’s. Project is inspired by The Legend of Zelda, a link between worlds. One of the main mechanics of this game is that link can turn into a painting to move on the walls I wanted to test out and see if I could achieve something similar using unity.

So here are the steps I needed to follow for this recreation figure out how to make the transition of the character from 3d to 2d, implement the 2d movement around the 3d meshes and add some final assets, particles and effects to start with something to work off.

I imported Jamo the mix and gem character into the project. Once I had the character in the scene, I had to figure out the best way to make the characters seem like it was part of the wall turns out that a new DS, High Definition rendered pipeline.

You have the ability to use decal projectors. This feature allows you to project decals into 3d objects. So I decided to use this in my project. I have prepared a setup where I have a game object that is a parent of the projector, but is facing the opposite direction of it.

In this way, the parent object can have the same forward direction as the wall, allowing the decal to be properly projected. With this setup prepared, I made it so that the player detected the object in front of it and place the projector parent at the objects collision point and direction once the projector is in place.

I activate a second camera that focuses on the projection, then for some testing. I added a simple movement system to the projection on my first approach: to make the projection move and rotate based on the walls I tried using ray, casts to detect what was on the right and left of it.

This technique, didn’t work out. So well, because the raycast wouldn’t have any information in situations where the angle between the walls was too big. Luckily, though, I’ve just recently met Freya Homer, a fantastic developer that creates a a lot of game to have content, especially for math related stuff, so make sure to check out some of her work.

It is simply amazing, while discussing this particular raycast issue, Freya helped me out by building a script that should be attached to an object in front of the mesh. The script basically checks if there is a Collider in front of it at a certain distance, if it returns something the script stores the position and normal direction of that point in a list, then it starts another check with a fixed step to the right.

It does that until it doesn’t find a collider, and once that happens, it will do a second check, inwards or backwards to see if it finds a collider to then start the process again. This eventually builds up a full path around the mesh.

Then I adapted this code to only sort the corners of the mesh once I have the corners of the mesh saved. The way I place my projection in the proper position is by checking the closest corner to the character and finding the next corner in the same direction of it.

Then, based on the distance from the player to the two corner points, I can find the interpolation value of where the projection should be placed now for the wall movement. I just needed to use the move towards function, to make the character move from its current position.

To one of the corners based on the horizontal axis value, once the character reaches the desired point, it needs to start moving to the next available corner and rotate. Accordingly, however, rotating the projector only at the exact corner point makes the movement look very stiff.

The solution. I found was to create a distance limit where the character stops moving and starts rotating on a pivot. That pivot would be determined by the intersection of the two distance limits. Once I find the intersection point, I can place a game object at that position.

Make the projection a child of it and then rotate that same game object. This creates a smooth transition between the movement mode and the rotation mode. After all, that was done. I’ve made it so that the character can get off the wall by simply positioning the character right in front of the projection.

Now, of course, I wanted to replace the projection image to something with a similar art style from the game. For this I collaborated with one of my great friends, Davi Shama, that does amazing woodcut art.

I figured that his style would be a perfect match for the visual I was looking for. I’ll, leave a link to his social, so you can check out his work. He made sprites of Jamo using the original game as a reference.

So then I started replacing the decoy projection with the art. Then I used the animator to add a simple rotation motion to the projection when the character was walking. Next, I added a bit of a transition animation, making the character turn and then slowly move it to the wall while getting its Z scale reduced to zero.

I added two particle effects for when the character merges and exits the wall. Finally, I added some post-processing effects that activate when the merge transition is happening to make the effect look even more immersive and after tweaking some final settings here’s.

The result of the project – [ Music ], to check out and download this prototype the link for the project’s. Repository is on the description of this. Video mixing jam is really only possible because of the amazing people helping out on patreon, including these top-tier supporters, and if you want to see more videos like this and support the channel, please subscribe and share this with friends.

Thank you so much for watching and I’ll, see you in the next one.

Source : Youtube

Related Posts

LEAVE A REPLY

Please enter your comment!
Please enter your name here