Making a Glass Case open over a timeline


Problem:

When putting the Sound Enemies into the Dining Hall level, I wanted it to feel apparent that initially they were not a threat. It wasn't until the player activated the Sound Enemies by reentering the dining hall would they wake up and start hunting for the player. To do this, I decided to lock the sound enemy behind a charging station with a glass case surrounding them. 


When the player activated the sound enemies, the glass would rise up and then the enemies would wake up. Initially I though this would be simple, I would just use a timeline and a Vector Lerp to scale each mesh I needed to in the sound enemy activation trigger Blueprint. I wanted to pass in an array of meshes and just use a for each loop to scale each of them using a timeline. This however did not work the way I would have liked. The first 3 meshes would just disappear and then the last one would work as I wanted. The reason for this, was each of the meshes was using the same timeline so they were trying to scale on different values and it would mess up the value the lerp was using for the alpha.

 

 

Solution:

With the help of fellow dev Vrij Patel, we realized the issue was that I was using only 1 timeline. I was going to have to change my whole approach and instead make a blueprint that had a mesh component and each one would have have its own timeline. I began by taking what I had initially and just moving it over to a unique Glass Case Blueprint and changing the array in the Activate Scan enemy to take in objects of my new blueprint. 

 W

I then followed the same process and began to work to make them scale. Along the way I had a few issues with the scaling which led to some weird issues which can be seen in the video below. 

After issues with this, I realized that I had made a simple error with the connections and it was scaling on the wrong axis.  I had forgot to keep the initial X and Y scale and plug them into the lerp. After fixing this connection and making sure all pins were In the right place, I finally was able to get the glass case to rise as intended and the sound enemies podiums were finished.




- Christian Ortiz, VECCA Dev

Leave a comment

Log in with itch.io to leave a comment.