VR locomotion via swimming-moves

Hi everyone,

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.

Thanks in advance for every hint on that!

Best,
Dave

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.

Thanks very much Bino! I think i´ll give it a shot.

Good luck! Sounds like a fun project!

Yes it is, i´m finally really gettin into it!
Do you happen to know a free plug-in that does that motion tracking thingy?

Actually I do! https://vreue4.com/ovri-howto

VR Exapnsion Plugin. Will have other things to help you.

Wow nice!
Currently i´m like pacman, but the yellow dots are information scattert around the web.
MaxBrainCapacityExpanding = true;

Thanks a lot!

1 Like

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.

Note : Use the SteamVR Input plugin (SteamVR Input for Unreal in Code Plugins - UE Marketplace) to make inputs easier to use in Unreal. It’s compatible with all headsets, not just Valve’s ones.

1 Like