Blog Post: Procedural Animation


Author - Johncarlos Lillo

2 / 29 / 2024

Problem - Procedural Recoil and Bugs.
This week, I was tackling some animations. I decided to go to the Procedural Animation route since I've never done it before, and I've always loved how games like Spore utilized this, and I decided that it would be easier to make Procedural Animation rather than having a set animation for the player, to make it easier on finding a shooting animation, and also to make the recoil seem more realistic. My biggest road block when working on the Procedural Recoil was that whenever I shot the gun, it would go THROUGH the player model, and permanetly stay at its last position. When hitting this, I was at a road block. Since it was my first time tackling Procedural Animation, I expected to run into an error.
Afterwards, I started working on the Recoil effecting the Players Camera Location. I did this in order to prevent players from holding down left click and having it be accurate all the time. My goal was that when the players holds down shoot, it slowly moves their Camera upwards through the Camera Boom. 

Solution - New Variables & Quick Fixes.
For the Procedural Animation, I knew I was going to run into a road block since it was my first time tackling any type of Procedural Animation. At first, I thought it was how i was clamping the random rotation and location of the gun. However, I soon realized I was getting the Location and Rotation of the gun DIRECTLY from the Gun Class. I instead made a new variable for the RecoilTransform of the gun, and used this variable instead to manipulate the gun. After this, it fixed the issue with the gun moving to locations and staying there. 
For the actual Recoil on the Player, I realized that I could multiply the value that moves the camera but Negative 1, which was a quick fix and had it work perfectly.

Here is a video showcasing the Final Product:

Get Deadlands Duel: Time Rift Rumble

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

The recoil is awesome I cant wait to see the animation switching for it!

The recoil feels great in the game. Its one of my favourite parts of the game

(+1)

NICE WORK!!!!