i´m building an underwater szene in VR and want the player to be able to move via “real” swimming-moves.
I am quite new to real-time developing and have absolutely no idea how to implement that.
By the way, i am working with an index plus knuckles.
My initial suggestion would be to track hand movements to detect a swimming motion. The marketplace has a great little gesture tracking system - Gesture Tracker VR in Code Plugins - UE Marketplace That would get you up and running quicker. You’ll need to iterate on what movement works best.
Once you’re detecting “swim movements” then you can think about how the character will move.
I have an idea for a swimming system if you use Valve Index controllers (for finger tracking & grip detection) :
Detect if the fist is clenched. In this case, do nothing.
But, when the hands are open, lock their position in the world (basically attach them to the volume of water), so it becomes like a climbing system but in 3D : any move with your hands “attached” will move your character instead.
I still need to figure how to create inertia. Actually locking hands in place is probably a good first step for this system but it means you will move instantly as fast as you move your hands so it will need a few tweaks to match the real world.
EDIT : I found how to create inertia. Don’t lock the hands on their world xyz, but simply get the normal vector when hands are open and apply a force on the character’s chest based on the direction of these vectors. If you base this force on the movement of the hands on this normal axis then there is no need to clench the hand to disable movement.
If you don’t have finger tracking & grip detection then you should probably use a button on your controller.