I am almost done implementing custom items. As I said before, the last thing to do is to wire the new cylinder grabbing system and make sure it works properly in the game.
Whenever I add a feature to Viva, I need to make sure it works in 3 different key areas: The player in keyboard mode, the player in VR mode, and the AI in a character.
The keyboard mode implementation is always the easiest since it is the most straight forward. I attached some callbacks to make sure right and left mouse buttons allow the player to pick up objects in view. As a new feature, whenever your hand is near a grabbable object, it will turn towards it slightly. Demonstration:

The next part was the VR implementation. Presently, I have hooked up a grip animation to the grip sensitivity so your hand opens and closes depending on how much you are gripping your VR controllers:

The thumb animation is still being tweaked. Also yes this does mean that I can throw in some finger specific Valve Index tracking. But more on this later. First come the priorities. Here is the item grabbing and grip animation in action:

Feels pretty natural so far which is always a good sign however it still needs a bit of physics finesse. VR can be the most tricky because VR with physics requires near perfect physics calibration. If physics go wonky even momentarily, it will feel really weird in VR and out of place. Picking up objects that can pull your hands away from where they are supposed to be in real life is also really bad. Unfortunately there is no good solution for this at the moment. Even games like Boneworks struggle with this.
The third and last side of implementation is the character AI side. This also includes making the new grab functions available for mod scripts. This part is not quite ready but I did get some progress done. To start, I added a new vision module to all characters.

This frustum will collect all items that it touches to inform the AI (and by extension, your mods) what to do whenever it sees a particular object. Here is an unfinished but conceptually working mod of the AI character picking up any item that comes in front of it:

I should finish this part by next devpost and have everything ready for another beta release. I really am eager to hop into the development build after this one so I can start adding back the behaviors.
Stay tuned!
DoctorDiscord
2021-04-23 05:35:58 +0000 UTCNekololiphile
2021-04-22 20:17:17 +0000 UTC