top of page

VR Gun System (WIP)

VrGunSystem - WIP
Tyler Serino

    This is my first project working heavily with VR. I have been a huge fan of VR for quite some time now, and decided to dive in and create something for it. The overall goal of this project is to create a VR playground with multiple different VR systems to showcase. As of yet, I have made some good headway on a VR gun system. This project started out as a blank ue4 VR template, but eventually, I opted to incorporate the VR Expansion Plugin by MordenTral. This plugin has made my life substantially easier on the side of character controls and interactions, so I could focus more on the creation of in-game systems. 
   The VR Gun System showcased above was built to be as modular as possible. Because of the direct interactions players can have with the different parts of guns, and the diversity of how different guns work, this presented a few different challenges. First off - I opted not to use skeletal meshes, as I found that using static meshes with some simple vector math proved efficient and less cumbersome. However, as previously mentioned, guns are somewhat diverse in their individual parts, and so making a hierarchy that could encompass all of them was initially an obstacle. For example - a pistol has a body, a slide, and a trigger. The slide acts as both a charging mechanism and an ejection mechanism. Whereas an MP5 has a slide for charging the weapon, but a separate chamber door that can move either with the slide or independently for ejecting bullets and casings. That means adding an additional mesh and code for it. 
  I didn't want to have a parent with a bunch of empty static meshes in it to be used for some guns that need them, and I didn't want to make an endless chain of parent/child classes. So to overcome this, I decided to create a set of overrideable functions in the parent class, that allows for information on the different parts of a gun to be passed to the parent from the child. This made it so I can create nearly any gun configuration with one parent and subclass. 

Needless to say, this is a work in progress, and still has plenty of aesthetic bugs (ie. hand animations not being proper). But overall is making good progress. Check back in the future for updates! 


About the Project


Current Features

Modularity - With the current system, you can pretty easily incorporate any gun using static meshes with little to no additional code needed. It is completely data-driven. The one exception is the need to override and pass variables through certain functions for guns that have more parts. Everything else, such as sounds, muzzle flashes, fire type/rate, and more, are data-driven. 

Realistic Projectile -
The projectile system is made using a line trace that arches downwards over time. It can be made to behave any way you want by inputting basic data such as speed. It is also able to have custom impact particles, bullet holes, and impact sounds added in that play depending on the surface the projectile hits. Future plans for the projectile are to move the core code to c++, as it is currently in blueprint. I would also like to add a ballistics system that allows for realistic ricochet. 


Animation Fixes - As you can see in the video, some of the hand animations are incorrect. However, due to the ease with which the VRE plugin allows this to be edited, it's really just a matter of manual labor. 

Projectile Improvements - While the current projectile system works well, I would like to migrate some of the core code into c++ for optimization purposes. Furthermore, I'd like to add a system for ballistics and ricochet. 


More Weapons! - Being as the idea behind this project is modularity, I really hope to push it to its limits and create a myriad of other weapons, such as flame throwers, rocket launchers, bolt action rifles, and more! 


Aesthetics/Audio - Once the system is truly complete I hope to give each gun custom audio, muzzle flashes, recoil, and more! 

Future Plans


More Projects

bottom of page