This one took some time.
Weapons System
I’m a sucker for realistic gun mechanics, so this was my top priority when I began working on a weapons system. I wanted it all: from trigger discipline to trigger safety switch.
I first started developing the system from scratch, but quickly found out that this wouldn’t be a realistic move if I were to release this game anytime soon. So I began looking up solutions online.
Found various implementations and packages to try out and see if something fit my needs. Most of these were too much “arcade” and too little “realism”, or didn’t really have any ways for me to test out their system before buying.
Finally found a weapon system that the dev made with realistic gun mechanics in mind, but this package was long deprecated and wasn’t supported anymore. This was a common characteristics of most packages. Devs lost interest or didn’t have time to continue their projects.
However, this was the closest I would get to a complete weapon system that aimed for realism, so bought the package and imported it into my project…aaaand nothing worked.
The documentation was out of date.
the scenes didn’t work.
all physics layers had shifted (as I already had my own layers).
the system didn’t work with steamvr’s default interaction system (which meant I had lost finger/skeleton animations and all previous mechanics).
The dev however did have a lot of tutorials on his youtube channel. Watching these tutorials and looking at his Inspector window I was able to set up my interactions as he had his, and after 2 days I was able to do the stuff that his package promised was possible.
Next goal was to get the hands working again. The weapon system that he had built relied exclusively on using the skeleton poser. The system would animate using blending to simulate the grapping of the firearms.
I had to remove all code related to this and add in hands that were mapped to the VR controllers so that I could move my fingers freely.
I also had to rewrite part of the codebase for interacting with items, so that I could add in poses for grapping stuff (my previous fix had broken this, so I had to redo it, so that it worked with the new system).
Took some time to get it working and there are still some funky stuff that needs adjusting, but overall I’m happy with the results.
What do you think?
You can try out the gun range shown in the video above, at my discord server:
Let me know which VR headset you have when you join and I’ll assign you with the correct role, so you can join our playtesting channel.
If you want to try out the latest “public” test build, then you can do so at:
This test build contains 8 sneaking missions.
What’s next?
Right now I’m focused on reworking past mechanics like knocking on walls and throwing magazines to make sound, so that these also work with the new interaction system. Afterwards, I’ll try to add in two handed weapons like rifles and try out the virtual stock that this weapon system includes, hopefully this will be less of a hassle now that I have a better understanding of the system.
The weapon system package I used
You can get the package from here:
I do recommend this system if you are looking for implementing realistic weapons in your own game.
But beware: the dev has deprecated it and the system won’t work out of the box. It got a steep learning curve and a lot of stuff needs adjusting.
He is however active on his discord server and recently say that he would like to continue working on it, so it might be a good idea to keep an eye on it.
Also the dev has a demo build on his discord server, be sure to check that out first before buying it.