The Great thing about VInterpTo (and other fun HUD manipulation)


Author: Alexander Capó

Date published: 8/4/2023

Hey peeps. I want to take this blog post to talk about two interesting functions/issues I had the pleasure to solve... after breaking my head open from how many times I've slammed my head on the desk. The first issue came with the movement of the turret. As I kept on writing, I noticed that the player and the sentry share a lot of inputs, which saw me constantly moving button input and functionality from the player class to the parent class of both player and sentry (tip: overriding really helps). It was all fine, up until it came to setting up the points for the sentry movement. See, the turret only moves either left or right. Possibly next week, the movement will be curved, but for now it moves in a straight line. Oh. My. Lord. Jesus Cristo protegeme. Learning how to use VInterpTo has been super weird. If anyone wants a solution to this specific problem, I have uploaded a few images that might help. This process took me well over 7 hours collectively. The issue I have was figuring out how to learp it over TIME, I.E, move it over the span of a few seconds. That didnt work. Once I found the definition of the function call, I figured you need the Tick function in order to lerp objects over time. 

My second issue was getting the pause menu to work, not as time consuming as the sentry movement, but still an issue. Our general dev, Gus, worked on the HUD for the pause menu, and only recently added the resume function which unpauses the game without pressing the pause button again. Soon enough, I found out that due to how I implemented the logic for the button press, which deletes and creates the pause menu depending on if the hud is up or not, it took two button presses for the menu to come back up. Thankfully, it was a quick fix on the player class. The only current known shippable in terms of hud (for prototype builds), after entering the sentry, and then leaving the sentry, the hud stays on screen. That will be fixed by next week.

Get Lustrat Somnia

Leave a comment

Log in with itch.io to leave a comment.