Posted May 27, 2022 by Tony Cooper
#unity #gamedev
Hello again,
Just made a new short video about one little piece of tech I'm using. As this is a top-down game with an angled camera I needed a solution for the main character walking behind walls and other obstructions, and the player not being able to see them or anything placed behind the object.
So I had a look on the Unity asset store and got Collider Based Object Fade which looked like it would have the functions I needed. But I did have to modify it quite a bit to work from this perspective, as by default it's first-person only. Which meant I had to do a bit of actual coding :O and took a few hours, but I got there in the end and I think it works quite nicely:
As you can see it's currently set to partly fade back in when the player gets within touching distance (so you know there is a wall there) but I might just have wall 'blueprints' that remain in place on the floor instead - I'll play around and see which solution looks better after some longer play.
I also need to set this up on all walls that should be affected (the ones above are just test ones) and get a feel for it across the whole level.
Tony.