I decided to write weekly updates. One post every week. Some will be about what is currently going on, providing some technical details or insight info about the game. Some will be covering particular topic related to the game (this could be AI, multithreading, inspirations, themes and so on). Some of these posts shall be really short, some will be much longer.
The first one is about the issue I am currently working on – forearm gun holsters.
I wanted the player to be able to modify, upgrade and sometimes even craft guns. But I also wanted to make it possible to have disposable weapons. Something you could grab, shoot few times and throw away (or use it to get parts!). You just had to be able to put your main guns away and get them into action as fast as possible. Ideally without reaching to some artifical pocket or holster point on your side or back. That’s when I came up with an idea for forearm gun holsters that would be automatic. If you just released the gun (open hand), gun would automatically get onto your forearm. Then if you needed it, you could do specific gesture or pull trigger and it would pop right into your hand. And it should be really quick.
And I needed it have some mechanism to do actual transition etc. I decided to have a small arm… on the actual arm. This small arm takes weapon from player’s hand, disconnects from the port, moves it onto the forearm and plugs it in there. It takes less than a half a second to do the whole thing. Currently it looks like this:
It uses simple 2 IK with two actuators that extend and one custom controller to decide the joint direction for the IK and to get the actual placement where the arm should be – guns will be craftable/modifiable and connection point will vary. It works nicely with the big arm moving, twisting, hand changing direction and so on.
Actuators extend to allow reaching for further locations and two avoid situations when it would clip through parts of arm. By extending these parts I am able to “go around” edges.
As for controls, for Oculus Touch it currently works as a combination of grab and trigger. If you pull trigger with empty hand, the gun goes into your hand. You have to press and hold “grab”, otherwise the gun will go back onto your forearm. The gun stays in a hand as long as “grab” is held. When it is released, tiny arm gets weapon from your hand. Knuckles should follow this pattern, although it will be more gesture driven.
For Vive Controller I want to have two control schemes. One will be similair to the above, but will use combination of trigger and trackpad press (to draw and holster). Second scheme should automatically holster the gun when you reach for something to grab.
This way, using the first control scheme, the player will have more control but second control scheme will be easier as there’s no buttons to learn or remember. Whenever it is possible to grab something, hand will be emptied to allow to grab.
Next thing to do is adding stuff that can be picked up.