Toggling Scannable Objects


Problem:

Early on in the development of Shutdown, I implemented a scanner that the player could use to see key objects and enemies. This scanner worked exactly as we wanted but needed tweaking throughout the month ahead to get to where we wanted. Insight into the scanner can be found in an earlier devlog I did. However, The issue we had with our scanner is it scanned objects a little too well. It would be able to find objects in rooms we did not want the player to be able to see yet or find objects the player may not need to see anymore. To solve this issue, I decided to create a blueprint that had a trigger zone and an array of static mesh connected to it. The blueprint would take these meshes and toggle the custom render depth pass bool to on and off. This would allow us to choose when we want certain meshes to be scannable and not scannable. The primary issue I ran into with this was having an array of static meshes would only allow me to choose meshes themselves in our world to be toggled. This was a problem because I needed to be able to toggle actors that had static meshes as components as well.

Before implementing the ToggleScanner Blueprint

Scanner Scanning an object in a different room. This could mislead the player and confuse them

Solution:

There were multiple solutions I tried to be able to access the meshes I needed and the properties in them. I tried various casts and tried experimented with the different static mesh types in blueprints. After trying all the static mesh types, I found no success. I realized that I needed to take another approach. After consulting with Vrij on our dev team, he told me about trying to use just actors instead of static mesh actors in the array.  Using this approach, I could get the static mesh component of the actor and access the properties I needed. This worked exactly as I wanted. However, I would get an error when an object was put in that did not have a static mesh. To fix this, I added a check to make sure getting the mesh component was valid before I made any changes. This fixed any issues I had and I finally had completed the Blueprint I wanted with all the functionality I desired.

ToggleScan Blueprint


Before Toggle

Before entering ToggleScan Trigger Box

 After Toggle

After entering the ToggleScan Trigger box


- Christian Ortiz (VECCA)

Leave a comment

Log in with itch.io to leave a comment.