After messing more with the grappling hook (solving some issues, causing more), I've decided to take a bit of a break from it. From this point I've started working on the weapon system. Melee weapons are going to be next, after I finish the ranged weapons.
The problem with VR weapons is that you can't just hold down left click to shoot, and press R to reload. You need to have physical interactions. Yes, we can just add a gun object to the players hand and have them shoot it, but I want more than that.
For ammunition, there will be reloadable magazines that you have to find and use to add ammo to the guns, and hopefully, if I can get this right, you can slide down the top to cock the gun in place.
Instead of instantiating prefabs as bullets (this can be taxing on performance), I'm going to be using a raycast.
Because I'm using VRTK for my object interactions, there are multiple ways to handle shooting input.
I've messed with many of them, but I'm trying to find the one that has the best compatibility with existing functions.
I can either extend from their base InteractableObject class and just override the "OnUse" method, but this hasn't been working for me for some reason. I can also just subscribe to the use method, but this proved tedious to add to each usable object and I got fed up with it. Now I'm just checking if "TriggerPressed" is true in Update(), but the problem is this won't allow me to change the use button in the future. I'm gonna continue messing around with this to find the best way to do this.
Additionally, I've added a page on the site for my brother and composer Eli Mantell where you can listen to the entire Oh Captain VR soundtrack. If you want to use any of it, please contact him via the form on the page!
Thanks for reading!