I was sifting through some old projects of mine when two projects on animation and gun mechanics caught my eye and gave me some ideas for an entirely new project.
A couple weeks ago I started putting down some thoughts on a potential procedural animation system for use on characters in a horror setting. Around the same time I was moving some data around in my personal project folders and I came across two projects I had tinkered with a year or two ago, one about VR gun mechanics and one about physical animation for creepy characters and saw an opportunity to combine them.
So while I've just got started I figured it would be a good time to showcase the two projects that now become the foundation of this new one!
VR Physical Gun Mechanics
There was a period of time I was playing quite a bit of Pavlov VR and wanted to see if I could somehow replicate some of the behaviour, but adding even more physicality, akin to what they later did in Boneworks ( just that they did a much better job of it ). I unoriginally called my project Pavlov Clone got started.
The first thing I needed to solve was a handling system so that all guns are always physical and you only interact with them physically instead of attachment. At first I used the excellent PhysicsHandles built right into UE4 but I started working on my own system when my needs outgrew the constraints of the built in handles. Properly supporting two handed handling was a bit of a nut to crack but I worked it out in the end.
Second was a gun system I wanted to be very flexible, and so all gun logic is contained in one class, with just a different mesh and some settings exposed to change all the behaviour of the weapon. It turned out quite OK as I was able to implement both a semi automatic pistol, the Colt 1911, and an open bolt blowback automatic rifle, the PPSh41. Though I didn't spend that much time on the model for the PPSh, so it sort of looks like a plastic toy, doesn't it..
The ammunition system is also quite flexible, with firing characteristics stored in each individual round, for then to be loaded into the weapon, changing its behaviour. This makes it easy to implement custom rounds like tracers or even faulty rounds or rounds with not enough powder to fully cycle an automatic weapon etc.
Bullet mechanics are very simple at the moment, and although it would be fun to implement travel time, bullet drop and penetration I don't know if I'll need it for this. But maybe..
This is not as exciting as it's just a weekend project trying to see if I could get some creepy behaviour using physical animation and cloth to make this ghoulish swamp thing come alive. There are a couple of things that work well though, the physicality combined with the erratic movement makes it look a little more realistic IMO, and I'll want to keep the things like the subtle body and head rotation it does when turning, as having it lock eyes with the player will be very effective in VR.
I also played around with changing the pivot of the character depending on which foot is touching the ground, and locking rotation if both were down, as is showcased at the start of the clip. This was interesting but had very little overall impact as you can see and I would like to try and flesh this out a bit more.
The upcoming plans around are a little more sophisticated than this test though, as I'm hoping to implement procedural animation that will interact with the environment around the character and adjust its movement and weighting accordingly. We'll see what I can come up with!