A Problem With Blade Trails | Tech Discussion
For this tech discussion I’m going to talk about a decision I had to make to solve a problem based on priority. The problem was how we might go about adding blade trails to the game. There seemed to be two different solutions available but I had to decide which one was the best.
For blade trails in our game, we needed for the length of the trail to differ depending on the weapon being held, since the player is able to pick up multiple different weapons. In UE4, however, the provided Anim Notify State for trails is only able to use sockets on the skeleton of the character.
This means that by default the animation can’t have any knowledge of socket points on a separate weapon object. This leaves me with two potential solutions to be able to add weapon trails with lengths that differ depending on the current weapon equipped.
Solution 1: Create a unique skeletal mesh Actor with a looping animation that has the trail Anim Notify State on it and add it to the weapon base class, scaling and positioning it to fit the size of the given weapon instance. Then create a custom Anim Notify State that accesses the current weapon and toggles on/off the trailing animation, and add it to every attack animation.
Solution 2: Add socket points to the character skeleton for every possible weapon configuration, separate every animation file by weapon, and add the default trail Anim Notify State to every attack animation, simply adjusting the parameters per animation.
Now given the current stage of our development, time is our most valuable asset. Because I knew that we only had 4 weapon configurations in the game and so it would not be an outrageous ordeal to add socket points for all of them, and because I knew the animations were already almost completely separated by weapon, Solution 2 would be far quicker to implement and so I chose that one.
I knew as I was making this decision to hardwire the animations and sockets to the given weapon that I was sacrificing the modularity that Solution 1 would have provided. Given our late stage of development, however, this modularity would be of no benefit. I also knew that I was increasing the size of the game by separating the animations by weapon rather than reusing the same clips for different weapons. But since most of the animations were already separated in this manner, the size difference would not be very great.
As I felt sure I was aware of the costs and benefits, I made my priority-based decision and chose the less modular, bulkier, but significantly faster solution.
Author: Reilly da Silva
Get Mythicism
Mythicism
Status | In development |
Author | Arcane Studios |
Genre | Action |
Tags | 3D, Action-Adventure, Dungeon Crawler, Fantasy, Singleplayer, Third Person |
More posts
- DOT Particle Effect Not Working In Release Build | Tech DiscussionJun 24, 2022
- Tech Discussion | Boss Post MortemJun 23, 2022
- Ranged Enemy Aiming Problem | Tech DiscussionJun 17, 2022
- Tech Discussion | Boss BehaviorJun 10, 2022
- How To Edit Animation Sequences (Additive Layer Tracks) In UE4 | Tech DiscussionJun 03, 2022
- Tech Discussion | Altar System and Player levelingMay 23, 2022
- Tech Discussion | Save SystemMay 23, 2022
- Adding Varied Footstep Sounds | Tech DiscussionMay 15, 2022
- Designing A Souls-like Block Mechanic In UE4 | Tech DiscussionMay 14, 2022
Leave a comment
Log in with itch.io to leave a comment.