Luke Haslett's Portfolio
Game Development Blog
An important characteristic of Diablo’s gameplay is that any wall or large object that sits between the player and their character, fade out of sight. This allows the player to clearly see what’s going on in the environment around their character.
This is something I wanted to replicate in Grinders Keepers, and luckily I found a method for doing this on the Unreal Engine community forums.
The first thing I needed to do was setup a material instance for my fading actors. Seeing as I’m using Infinity Blade assets, I made a copy of some of these materials and changed their blend mode to translucent, whilst adding a scaling parameter that I could access for the opacity.
Next, I setup a new actor for a modular wall piece and added the materials to a static mesh component. When the actor is created, it creates dynamic material instances and sets them as variables, which will be used to get and set the opacity.
Following that, I went into my character pawn and attached a collision box to the camera’s spring arm. So whenever there’s a component overlap, it casts to the overlapping wall and either hides or shows it.
Additionally, I added a broken wall asset inside the walls so that it would look more effective, otherwise when the walls disappear it could confuse the player into thinking there’s a space to move through.
The walls of the dungeon will now disappear like so: