Programming: TANK WEAPON
- Sergio Soriano

- Mar 13, 2018
- 2 min read
Our next project in for all three of my studios classes will be to have a functioning Battle Arena level complete using the vehicles and weapons we created in 3D for Game Art for the first two months of the semester. To make all of this work, this week in programming we learned about using the Blueprint class editor in Unreal Engine 4 to create a projectile with set movement, behavior, and interaction, that can be easily spawned in to fire from the vehicle weapons. We learned how to spawn in Blueprint classes on events such as overlapping a trigger box or pressing a button (see below). This method can be used to spawn in a simple physics object as a projectile, however, it has some drawbacks, such as not interacting well with non-physics objects, or objects using "fake-physics", and they can get very expensive in-game.

We were also taught how to set up line ray-casting, which, simply put, is a line that goes on infinitely until it's stopped by an existing mesh. Using that feedback, you can use the location as a homing target for a projectile to travel to (see below), or use it to spawn in other actors, blueprint classes, particles, etc.

My plan for my weapon is to use the Spawn projectile method using simulated physics. This will allow me to have better control over how my projectile moves, as I'm not aiming for the precision of line trace, or the animation of a physics object. My weapon is a high-cool down, high-damage type, meaning that if it hits a target, the damage will be massive, but the weapon won't be spammed because it will have a large delay between uses for the sake of fairness, and not making the game crash. This will also be paired with a very low-precision, as I plan to have an impact radius so that even if you miss the target, a small amount of damage will still be dealt to any opponent in a specific radius from the impact site, and and an above average speed for the vehicle, to counteract the high-cool down rate. some changes will have to be made for the sake of time and technical limitations, but this is my base plan for the programming side of the tank weapon and battle arena.

(References from Pacific Rim, Transformers: Revenge of the Fallen, and Ender's Game)





















Comments