top of page
Writer's pictureHolly Boyle

'Force Grab' & Inventory

As we got further into development and received more feedback, I ended up working on a few systems focused on providing quality-of-life improvements to the player's general experience.


Force Grab

One of these was the "Force Grab" mechanic, that would allow the player to grab objects from a distance rather than having to reach and pick them up manually. The initial version of this was extremely simple, and just made use of a sphere trace to detect and grab objects the player pointed at.



We decided to implement this feature based on our own tests and feedback from others. It was often tedious and tiring having to reach for certain objects, especially when dropped on the floor. Other times, players would be blocked from reaching in-game objects by their real world surroundings.


Even the initial version was met with positive feedback, as it made the game far more convenient to play. However, we still had a lot to improve on. It was still difficult to accurately target distant objects with the sphere traces, and they would often be blocked by nearby scenery.


I made a few adjustments to the mechanic to help fix this issue, first by making a unique trace channel for the sphere traces. I then added large capsule colliders to some of the actors the player would be grabbing, and made sure they would only collide with the sphere traces. This made it far more forgiving when trying to point at distant objects.



The feature was developed further after receiving a suggestion from a tutor during playtesting. I had just implemented a mechanic that allowed for the player's sword to be thrown to damage enemies, but there were a few downsides. Mainly, the player would usually miss the enemy, as the sword's trajectory was pretty unreliable. If they were quick and accurate enough, they could use the force-grab feature to grab it back before it travelled too far away, but otherwise they would have to run over to pick it up back up.


As it was, throwing the sword was rarely worth the risk to try. However, our tutor did like the idea of throwing and then pulling the sword back through the air, likening it to Kratos' axe in God of War.


I decided to integrate the feature properly into the mechanic. I did some research into how other VR games achieve similar effects, such as Half-Life Alyx's gravity gloves. The result I ended up with was this:



After throwing an object, if the player keeps the grab button held, a tether appears between the player's hand and the object. For a period of a few seconds, the player can now use a small hand-flick motion (inspired by Half-Life Alyx) to return the object to their hand.


This was received very positively in our group presentation, and since I'd already had the idea, I decided to extend the feature to the regular force-grab.



The same tether would appear as before when pointing and selecting a distant object, requiring the hand-flick gesture for the player to grab it. This was more tactile and had less chance of accidentally grabbing the wrong object.


 

Inventory


Another quality-of-life feature I ended up adding to the game was a method for the player to carry additional objects.


The idea arose around the time we were receiving feedback on our ideas for our magic system. At the time, using the magic would involve picking up crystals from a ring on one hand and placing them into a slot. A potential problem with this system was pointed out, being that the player would often have to drop whatever object they were holding in one hand to grab the crystals.


This lead to me thinking about other times when the player might be forced to drop objects, potentially losing them depending on the level layout. Or times where the player might want to bring an item with them but are already holding something in both hands.


It was clear that the player needed some sort of inventory for carrying additional objects with them, or even just for holding objects safely while otherwise busy. The solution I came up with was to add a sort of item 'holster' that would sit at the player's side.



Any actor that could be picked up already could now be attached to the holster by simply releasing it while hovering over the holster's collision box.


I wanted to make sure the holster's wouldn't be distracting or get in the way of the player's view, but at the same time there would still need to be something to indicate their presence to the player. I went with adding a translucent sphere at the position objects would be held in the holster. Initially, thee sphere would be almost transparent, but when the player hovers their hand over it, it becomes much more visible.


After showing the feature to the rest of the team, they responded positively and suggested having another holster, so the player would have one at each side.


The main difficulty I encountered when implementing this feature was around trying to have the holster follow the player's own rotation. Unlike with non-VR games, the player character's rotation doesn't necessarily match the direction the player is facing themselves in the real world. The only thing I had to go off of was the camera, which was tracked to the player's headset.


I created a scene component that would be positioned directly below the camera at all times and would interpolate its Z-axis rotation to match the camera's own. The holster actor would then be attached to this scene component and offset accordingly.



The result worked very well when the player is looking straight ahead, with the holster's basically following the player's rotation exactly as intended. However, the further the player pitches their headset up or down, the holster's rotation becomes a lot more sensitive to small changes in angles.


I don't currently know enough about rotator math and unfortunately didn't have the time during development to research it further, so I didn't end up finding a solution to this. For the most part though, I'm happy with how the feature works and I think it improves the player's experience of the game.



2 views0 comments

Recent Posts

See All

Comments


bottom of page