Turret Tracking
Author: Matthew Pacheco
As we are getting closer to the finished product of the game, I am working less on new defenses, and more on improving/ adding functionality to existing ones. There are a lot of different issues that I ran into, but having run into some before, like the component hierarchy, I was able to move past them quickly. One of the optimization pieces that gave me the most difficulty was different ways for the turrets to track the enemies. The grenade turret in particular, has to take into account the fact that it's attacks take time to hit their target. This means, between the turret shoot and the attack landing, the enemy will be in a different position. There are many solutions to this, but each come with more issues that have to be fixed before it works perfectly.
To deal with these calculations, I mainly used interlopes based on the enemies distance from the turret, and velocity. There are multiple values that now lerp based on how far the enemy is, and allow the turret to accurately hit enemies with predictable pathing. The lerp functions along with the explode on impact, made it possible to have this turret fire accurately in different situations. I was then able to add the same functionality as the other turrets, so that they can target the best enemy of the ones in range. Eventually, there will be different options for how the turrets target and fire, saved as presets.
Posted on 11/16/2023
Get Cyber Siege
Cyber Siege
Third-to-First person Castle Defense game
Status | In development |
Author | TheCodeCollective |
Tags | 3D, First-Person, Futuristic, Robots, Singleplayer, Third-Person Shooter, Tower Defense, Unreal Engine |
More posts
- Visual Impact: Enhancing Player FeedbackFeb 03, 2024
- Revamping Reticles: Adding Specific DynamicsFeb 02, 2024
- Spider Enemy Dying in the AirFeb 01, 2024
- Small Changes: Beginning vs End of developmentJan 27, 2024
- Airstrike TimerJan 25, 2024
- Overcoming Code Mazes: Transitioning to Radial Progress Bars in Unreal EngineJan 20, 2024
- Airstrike Power-UpJan 18, 2024
- Resuming the Journey: Maintenance & PlanningJan 13, 2024
- Drone Enemy Particle Effect BugJan 11, 2024
Leave a comment
Log in with itch.io to leave a comment.