Undead Blade
About
Undead Blade is an individual virtually reality game project which is currently being developed using Unity3D. This game brings the player into the VR world with a zombie based wave spawner set in Ancient Rome. Differing from other similar games, Undead Blade focuses on utilizing a complete melee combat system with realtime physics.
The Specifics
When viewing the major physics within the project all weapons are velocity tracked, creating a drag when swung and not penetrating other meshes, unless desired when stabbing. Also, the zombie in the game is created as a complete active ragdoll. Here the zombies limbs are connected through a group of configurable joints with a spring applied to each joint creating a standing effect, then a disabled copy of the zombie focuses on creating an animation which the active ragdoll zombie version then mimics this by rotating each of the configurable joints to create an animated effect while still being fully susceptible to physics. With this in place, the zombie can then be controlled using a force applied to the hips allowing it to be propelled forward.
Following this, the melee combat system build off of this physics scenario. Specifically two topics are targetted, a general hit and stabbing. Due to the implementation of velocity tracked weapons and the zombies being constructed as active ragdolls, the general hit is already taken care off and responds as expected when comparing a similar scenario in the real world. When viewing the idea of stabbing, the weapons have a trigger collider on the tip of the blade which when triggered on the zombie it checks the velocity of the stab and the angle between the collider and the zombie to ensure this relationship can only be achieved when directed in the forward direction. Upon these requirements being met the objects are connected by ignoring the physics interactions and creating a configurable joint connecting the two objects and locking the movement besides the blade direction allowing the stabbed object to move on the blade to continue the stab operation. Upon a disconnection between the blade and the object the configurable joint is then destroyed.