An elegant solution. This was a lot simpler than I expected. I would like to do a variant that let's me fly in VR ... without a whole bunch of flapping. Maybe more like some version of levitation, where I move my hands slowly ...
Perfect time again! I just finished playing Hubris VR’s demo and the swimming in there is amazing. Entering and exiting the water finally makes me feel like I’m in another reality.
These was extremely helpful! I didn't need to create a swimming mechanic specifically, but the video did a great job explaining how to integrate XR controls with a custom movement controller. Thanks!
@@JustinPBarnett I have further tuned code a bit adding movement down simulating gravity. Would you make video tutorial on how to add diver model and animate to have his hands also grab things for seabed? This would complete your tutorial and would be very useful to subscribers
Dude! You're a mind reader. I was trying to figure this out last night. I thought it might be as simple as taking the gorilla tag movement and removing the collision check, so that Hooke's Law acts when you're just swinging your arms around, but... no such luck. I tried it, and laughed at my own stupidity. Well, time to find out how it's actually done!
Any suggestions on how to do arm swinging locomotion for Quest with the new XR toolkit? I've used the ElectricNightOwl asset in the past but trying to figure out a solution that doesn't require SteamVR.
The quest 2 has really cornered the market, so naturally I'm excited for the next iteration of that headset! And once Apple enters the HMD market (suposedly this year?) VR is going to take off like crazy
Hello Justin. Quick tech question. I am struggling with water in VR a bit, specifically in single pass instanced mode on a Quest 2. In multipass it works fine, but the performance hit is too big. Do you have any suggestions for making realistic looking water in single pass instanced mode? Having the same issue with volumetric clouds, it's pretty annoying... Thanks in advance!
Hi thanks for your awesome tutorial, I'm currently create a vr game for oculus quest 2 and I would like to know how I can pause the game with XR when the user removes the HMD or opens Universal Menu. I couldn't find any information about this subject. Maybe you could make a video about this subject because your explanation is awesome.
This Is amazing and I thank you for creating this. I was wondering though, is there a way to only activate it when your player hits an object tagged water? I would love to incorporate it so that I can have a level on both land and sea, however currently its making it so that I can fly above the water. I've been trying by myself for a few hours, but honestly I have no coding experience on my own. Also is there a way to make it work with a player controller instead of a rigidbody? When I added the script to my character with a player controller, it dropped like a brick and wouldn't work so I had to remove the player controller. Is there a way to have two different xr setups as prefabs, then activate the one I want when I touch the water object in the level? I feel like that would work, but I don't know how I would change them out.
Yea you can definitly do that! I'd add a collider to the swimming area and have an if statement on the swimming script that only activates it if you're within a particular collider! As far as the character controller, unfortunately this script won't work with that because the character controller doesn't use the physics system
The new Interaction Toolkit has the action maps for each hand separated in None, Interaction and Locomotion, should this affect to hoy you set up the script and the references?
Quick question. Why after all this operatıons grab function does not work? I have reassigned select and activate, checked all optıons as per standard ınteractıon tutorıals, but still can't swim and grab objects from seabed.
Great video. Is it possible to make a tutorial on jumping while using Xr movement system? I was watching ur old tutorial and when I jump and don’t move it’s fine. The moment I move I stutter when in the air. Tried asking in ur server and no one knew how to fix this :(. Anyway cool mechanic. I might add this to my game. Will probably be on the oculus store within 6 months - wish me luck. Would u want to check out my game when I do?
I don't get the purple text that you do when I type the SerialField and UnityEngine and I don't even get the InputActionReference red. Are you using Visual Studio cus that's what I use.
Any solution for using Oculus plugin and the velocity? When I try to use OpenXR, I get HMD issues in my eyes (left eye is grey, right eye doesn't render) but with the Oculus plugin, I cannot get the Velocity to work
Hello there, Justin! What VR headset are you using to develop in Unity? We're a bunch of friends who somehow managed to wiin a few gamejams on sandbox.game platform and now we consider diving into VR space as it is the future (utopian or dystopian, doesn't matter). I've tried quest 2, but the FOV is just terrible.
@@JustinPBarnett Thank you so much! We're going with the valve index and we'll follow your every video! You're our sacred mentor from now on! Good luck. Your channel will keep growing if you keep putting the effort. People are just entering the Vr...Give it 10 years for 60% of population swimming inside the ocean of infinite dreams.
@@gikisTSB go with Quest 2, since Valve Index is tethered to.a powerful PC, and it is very high cost. Quest 2 is cheaper, untethered and you can do the tutorials without any flaw and you also have more content in TH-cam regards Quest 2 dev.
@@Renatim2009 Hello, Renato. Thank you for your comment. In my country Valve Index costs 750 euros and buying new Oculus quest 2 can cost around 600 euros, because I want the elite strap, link cable, extra battery and so on. I also have a powerful ryzen rtx 3070 laptop, so I think its not a problem to run a basic development on it. Knowing these things, would you still think Quest 2 is way to go?
@@gikisTSB I see. Yeah, in that case, Valve Index is really a good option. :) But not forget that Index needs sensor towers, so you will need some space.
YESYESYES. I’ve been waiting for somebody to do a half decent swimming tutorial for SO long. The internet thanks you.
Happy to help!
An elegant solution. This was a lot simpler than I expected. I would like to do a variant that let's me fly in VR ... without a whole bunch of flapping. Maybe more like some version of levitation, where I move my hands slowly ...
Thanks for making this tutorial Justin! A swimming system is mandatory for any survival game
Ooo I like your thought process
Download the project here: shop.justinpbarnett.com/products/vr-swimming
Perfect time again! I just finished playing Hubris VR’s demo and the swimming in there is amazing. Entering and exiting the water finally makes me feel like I’m in another reality.
Right? It's a cool feeling
These was extremely helpful! I didn't need to create a swimming mechanic specifically, but the video did a great job explaining how to integrate XR controls with a custom movement controller. Thanks!
I did wrong first time creating velocity for controller interaction, changed it to controller itself and it worked perfectly. Big thanks for tutorial!
Nice work!
@@JustinPBarnett I have further tuned code a bit adding movement down simulating gravity. Would you make video tutorial on how to add diver model and animate to have his hands also grab things for seabed? This would complete your tutorial and would be very useful to subscribers
Woah, I cant wait to try this in the river!
Hahaha best of luck
Nice, i have been trying to implement it with hurricaneVR and it was very easy, and the swiming feels so nice with this solution :]
Dude! You're a mind reader. I was trying to figure this out last night. I thought it might be as simple as taking the gorilla tag movement and removing the collision check, so that Hooke's Law acts when you're just swinging your arms around, but... no such luck. I tried it, and laughed at my own stupidity. Well, time to find out how it's actually done!
No way! Well hope this helps point you in the right direction!
What a great tutorial! Thank you, this helped me a lot.
Great to hear!
Very Helpful tutorial, Thanks!
Any suggestions on how to do arm swinging locomotion for Quest with the new XR toolkit? I've used the ElectricNightOwl asset in the past but trying to figure out a solution that doesn't require SteamVR.
Hey JP, are there any upcoming headsets or VR technologies (non-HMD) that you look forward to either playing on / developing for?
The quest 2 has really cornered the market, so naturally I'm excited for the next iteration of that headset! And once Apple enters the HMD market (suposedly this year?) VR is going to take off like crazy
Hello Justin. Quick tech question. I am struggling with water in VR a bit, specifically in single pass instanced mode on a Quest 2. In multipass it works fine, but the performance hit is too big. Do you have any suggestions for making realistic looking water in single pass instanced mode? Having the same issue with volumetric clouds, it's pretty annoying... Thanks in advance!
Thank you for the great tutorial! I'd also love to see you do a swimming tutorial with oculus hand grab interaction as well. That would be awesome:))
Did it work for you? With the recent updates I must be doing something wrong, because it doesn´t work
@ i can help you
Hi thanks for your awesome tutorial, I'm currently create a vr game for oculus quest 2 and I would like to know how I can pause the game with XR when the user removes the HMD or opens Universal Menu.
I couldn't find any information about this subject. Maybe you could make a video about this subject because your explanation is awesome.
Oh that's a great idea. I'll have to make a tutorial for that
This Is amazing and I thank you for creating this. I was wondering though, is there a way to only activate it when your player hits an object tagged water? I would love to incorporate it so that I can have a level on both land and sea, however currently its making it so that I can fly above the water. I've been trying by myself for a few hours, but honestly I have no coding experience on my own. Also is there a way to make it work with a player controller instead of a rigidbody? When I added the script to my character with a player controller, it dropped like a brick and wouldn't work so I had to remove the player controller. Is there a way to have two different xr setups as prefabs, then activate the one I want when I touch the water object in the level? I feel like that would work, but I don't know how I would change them out.
Yea you can definitly do that! I'd add a collider to the swimming area and have an if statement on the swimming script that only activates it if you're within a particular collider!
As far as the character controller, unfortunately this script won't work with that because the character controller doesn't use the physics system
Hey Justin,
Can we get a tutorial on weapons shooting and reloading and even a respawn kind of script
Yes! I need to make that one soon. It's a highly requested video
Epic, I have to see this
Hope you like it!
Would this be doable with hand tracking??
No way you making this a tutorial 😁 yay
Hope you like it!
The new Interaction Toolkit has the action maps for each hand separated in None, Interaction and Locomotion, should this affect to hoy you set up the script and the references?
Quick question. Why after all this operatıons grab function does not work? I have reassigned select and activate, checked all optıons as per standard ınteractıon tutorıals, but still can't swim and grab objects from seabed.
How much would you charge to do a model of a place if I send you a picture?
Great video. Is it possible to make a tutorial on jumping while using Xr movement system? I was watching ur old tutorial and when I jump and don’t move it’s fine. The moment I move I stutter when in the air. Tried asking in ur server and no one knew how to fix this :(. Anyway cool mechanic. I might add this to my game. Will probably be on the oculus store within 6 months - wish me luck. Would u want to check out my game when I do?
Yea I need to do an updated jump tutorial for rigs with a rigidbody
@@JustinPBarnett that would be great!
I don't get the purple text that you do when I type the SerialField and UnityEngine and I don't even get the InputActionReference red. Are you using Visual Studio cus that's what I use.
I'm using JetBrains Rider, so the coloring may be different
@@JustinPBarnett That's the only diffrent right?
Does anyone know why it doesnt work when i build it on my quest?
Got any more details?
What if you only want to swim in a certain area?
How do I change the grip button to be the trigger button?
Any solution for using Oculus plugin and the velocity? When I try to use OpenXR, I get HMD issues in my eyes (left eye is grey, right eye doesn't render) but with the Oculus plugin, I cannot get the Velocity to work
I take that back, I got the velocity working with oculus plugin but just having trouble figuring out how to work when only entering water
Glad you got it working! You put a trigger box around the area where the water is and have the player checking if they're within that box
I beg of you to make a flying tutorial like bird flying where you have to flap your arms I order to move and maybe even glideing
How make online server pls
Planning on making a multiplayer tutorial soon!
do you have a tutorial for making a vr game multiplayer
Coming in the next few weeks!
@@JustinPBarnett alright thanks
Hello there, Justin!
What VR headset are you using to develop in Unity? We're a bunch of friends who somehow managed to wiin a few gamejams on sandbox.game platform and now we consider diving into VR space as it is the future (utopian or dystopian, doesn't matter).
I've tried quest 2, but the FOV is just terrible.
Usually I use the Quest 2 because it has the most marketshare, but I also highly recommend the valve index!
@@JustinPBarnett Thank you so much! We're going with the valve index and we'll follow your every video! You're our sacred mentor from now on! Good luck. Your channel will keep growing if you keep putting the effort. People are just entering the Vr...Give it 10 years for 60% of population swimming inside the ocean of infinite dreams.
@@gikisTSB go with Quest 2, since Valve Index is tethered to.a powerful PC, and it is very high cost. Quest 2 is cheaper, untethered and you can do the tutorials without any flaw and you also have more content in TH-cam regards Quest 2 dev.
@@Renatim2009 Hello, Renato. Thank you for your comment.
In my country Valve Index costs 750 euros and buying new Oculus quest 2 can cost around 600 euros, because I want the elite strap, link cable, extra battery and so on.
I also have a powerful ryzen rtx 3070 laptop, so I think its not a problem to run a basic development on it.
Knowing these things, would you still think Quest 2 is way to go?
@@gikisTSB I see. Yeah, in that case, Valve Index is really a good option. :) But not forget that Index needs sensor towers, so you will need some space.
How do I setup the velocity on the controllers if I am using the auto hand asset?
Should be able to do it the same way if Auto Hand doesn't already have a velocity value (which I'm pretty sure it does)
@@JustinPBarnett couldnt find one
First
🙌