#Joint Based VR Grabbing Physics

11 messages · Page 1 of 1 (latest)

uncut rock
#

I love Godot, and I love its XR toolkit. One thing I don't love about it though is its grabbing implementation. It forces developers to set up pre defined grab spots for all objects that need to be grabbed, and for some games, this just won't do.

I'm working on an Joint Based Grabbing implementation that lets a user grab an object wherever they wanna grab it. It currently works by attaching a StaticBody to the Controllers, and 3 nodes inside of that, an Area3D, a Collision Shape (ball shaped), and a Joint. I'm planning on releasing this on the Asset Library once it's done, hence the Tool and Assets tag.

In the video, the hand on the left has the Old Grabbing, and the hand on the right has my implementation. The cube has the Old Grabbing component, but the ball doesn't. Since both are RigidBodies, my Component was able to grab them both.

#

This is a recording from a Native Quest 2 build, btw.

I was also planning on doing comparison of both grabbing methods, but the cube decided to ascend through the 4th dimension and clip through the wall 😅

indigo birch
#

that looks cool. it seems to me that the godot method is very rigid in the connection between hand and object and yours lags behind a bit - so would it be possible to use a hybrid of both techniques? if an object has grab points, use them and if it does not, fall back to your method? great work though, excited to see where this goes

uncut rock
#

I could also hypothetically replace the Joint with Remote Transform instead if an object has a specific collision mask (or a setting gets toggled), so that it just snaps to the hand without the latency

#

The Godot method uses remote transforms anyways so

#

I only opted for a joint based solution in the first place in the hopes that heavier objects could affect a hand's position, but it does the exact opposite since my hands arent physics bodies themselves right now

uncut rock
#

Welp, I just tried to use Remote Transforms and it did not work out pretty
The remote transform made the object clip into the players hand
I could probably tweak the position of the RemoteTransform manually but I want this Component to be modular enough that it work with any hand that gets thrown at it, so I'm not gonna work on getting that done right now.

regal marsh
#

i wish i could have a vr headset

uncut rock
#

Joint Based VR Grabbing Physics