Re-center your VR Player in Unity

  Рет қаралды 17,527

Justin P Barnett

Justin P Barnett

Күн бұрын

Пікірлер: 57
@jr8209
@jr8209 Жыл бұрын
$5 per super useful bit info I get from you. Centering & tape over sensor. Thanks bud!
@JustinPBarnett
@JustinPBarnett Жыл бұрын
🙏🏻
@anmaavr8315
@anmaavr8315 3 ай бұрын
Love the sensor tape tip! Thank you always making a awesome tutorial!
@buffoverflow
@buffoverflow 9 ай бұрын
Thank you from 2023! Love you man!
@kingminor
@kingminor 2 жыл бұрын
Can't wait to use this feature in a game. Maybe a multiplayer flight sim? (Was that to subtle of a hint that I want a multiplayer tutorial)
@adhochero6619
@adhochero6619 Жыл бұрын
on the rotation angle part, to make sure you do the calculation correct and don't have to -rotationAngleY, it is destination - origin. so the place you want to be minus the place you are, or in this case rotation you are. that will give you the right value.
@JustinPBarnett
@JustinPBarnett Жыл бұрын
Good tip
@adhochero6619
@adhochero6619 Жыл бұрын
​@@JustinPBarnett I did have a question on how to ensure the player is in the correct position at the start of the game. the repositioning in this tut works on the button press, but if I try and run it in start the player isn't repositioned. seems like the tracking position is being set afterwards, so not sure when is the right time to call it to get that to work.
@justaddvr
@justaddvr 7 ай бұрын
I've got the same issue, the tutorial code works perfectly when triggered from the 'Context Menu' but does not work when calling it directly from the code, since the XR Rig falls through the floor. It looks like it takes Unity a short time to load up the 3D environment, so maybe putting a check into the code to ensure the floor is loaded would work before trying to reposition the XR Rig and main camera?
@yagneshkrishnan2544
@yagneshkrishnan2544 4 ай бұрын
@@justaddvr Did that work out for you?or did you get any alternate solution?
@maxrichhart4929
@maxrichhart4929 2 жыл бұрын
Missed you bro!
@JustinPBarnett
@JustinPBarnett 2 жыл бұрын
Download the Source Code: value.vrcreators.io/recenter
@GameRevenant
@GameRevenant 10 ай бұрын
I was wondering how I could override the Oculus button (Meta Quest 2) so that when someone holds down the button, we call this code. Right now in my game the Oculus button always brings up the Oculus menu and I can't seem to make extra behaviors happen...
@MythicalDevs
@MythicalDevs 2 жыл бұрын
Hey Justin! Can you make a tutorial on how to climb in vr?
@jjcplays536
@jjcplays536 2 жыл бұрын
can you please make a tutorial on how to switch between teleportation and smooth walking and by the way you make the best tutorials, thank you so much
@giovannimurru
@giovannimurru Жыл бұрын
Hi Justin, Thanks for the video. Great content as always. I see you are using tape on the sensor to keep the Quest always on. I have just a tip that maybe you don't know. There's an option in the Meta Quest Developer Hub app to disable the proximity sensor and also another one to ADB your app over Wi-Fi.
@radari7180
@radari7180 6 ай бұрын
Thank you very much!
@jayyap39
@jayyap39 2 жыл бұрын
Hi Justin, actually can we just use the equal "=" sign to directly change the current player.transform.position to reset.position? Because what're we doing right now is minus it and plus it back at the next line
@JustinPBarnett
@JustinPBarnett 2 жыл бұрын
Try it and see, but yea that should work.
@mannplaza2968
@mannplaza2968 2 жыл бұрын
Thanks!
@endyrz
@endyrz Жыл бұрын
exactly what i've been looking for, thank you!
@timvandeneng4724
@timvandeneng4724 Жыл бұрын
Great tutorial! thanks man!
@JustinPBarnett
@JustinPBarnett Жыл бұрын
My pleasure!
@lupus41
@lupus41 2 жыл бұрын
Hey can you do an tutorial about velocity controller tracking in VR i don't understand it right know
@SamSamTutorialMan
@SamSamTutorialMan 2 жыл бұрын
thanks. you saved my butt
@futebol258
@futebol258 Жыл бұрын
Now I have a problem, when I look to the left the view moves to the right and vice versa, how can I solve this?
@JustinPBarnett
@JustinPBarnett Жыл бұрын
Sounds like you inverted your player??
@futebol258
@futebol258 Жыл бұрын
yes @@JustinPBarnett
@JonHuhnMedical
@JonHuhnMedical 2 жыл бұрын
Looks like this only works if the XR Origin is level. In a flight sim scenario where it could be oriented in all kinds of crazy ways, this code gives unpredictable results.
@RazReags
@RazReags Жыл бұрын
I think the reset point would be set to the aircrafts seat position instead.
@TheARTofMining
@TheARTofMining 6 ай бұрын
Good video and thank you for it - HOWEVER IT DOES NOT SOLVE THE BIGGER ISSUE WITH VR ORIENTATION using XR. I have multiple scenes each that require the player to start facing a UI screen when the scene(s) loads. Despite hours of searching I have found no reliable solution as yet! I'm sure it's something the the XR interaction toolkit guys really should focus on. When you launch your VR game the XROrigin & Camera orientations of direction do not follow the splash screen direction(Unity Logo). I have tested starting my game, standing at a certain rotation angle while the splash screen appears. This puts me in whatever rotation. I then quit the app and physically turn 90 degrees and then start the app again. My orientation is turned to the corresponding 90 rotation, indicating that it does not orientate from the splash screen it orientates from your boundary setup I think! Wouldn't it be much simpler for the XR interaction toolkit to provide a RESET functionality? Such that when you load your game or a scene, a RESET would take the whole rig, block and disable the camera (instant FadeOut like teleport does), and then reset the camera Y rotation to zero and also zero out the camera position to the XROrigin position. Then re-enable the camera (quick Fadein like teleport does). This way you could set the XROrigin to a target (GO) position and rotation and the RIG would comply to those position and rotation values of said target. This code below puts the XROrigin in the correct target position, but if I walk away from center or physically turn that becomes a positional and rotational offset. [ var rotationAngleY = MainCamera.transform.rotation.eulerAngles.y - targetTeleportLocation.transform.rotation.eulerAngles.y; PlayerXR_Origin.transform.Rotate(0,rotationAngleY,0); PlayerXR_Origin.transform.position = targetTeleportLocation.transform.position; ] What I need is to be able to recenter the CAMERA to the XROrigin *(simple in theory) but I have not discovered a way! InputTracking.Recenter - This only works with seated and standing experiences. Room scale experiences are not affected by Recenter and I see tons of issues with people trying to implement. Jeez how hard can it be for XR guys to integrate this? Rant over! Cheers
@alexanderkupin9933
@alexanderkupin9933 2 жыл бұрын
Is there an equivalent way to do this for the Oculus integration?
@RupertsTech
@RupertsTech 6 ай бұрын
Exactly the same method
@nando3d
@nando3d 2 жыл бұрын
Hey Justin can you teach us how to add avatars and configure they?
@Battlestad
@Battlestad 2 жыл бұрын
Great video. These are helping me out ALOT. Can you make a tutorial on how to make your own VR home for the Quest? I have a scene ready and all, but Im stuck on how to import it as a home environment
@PixelRacoon
@PixelRacoon Жыл бұрын
Stupid question, you know how to do that with HurricaneVR? It seems the rotation doesn´t work.
@RichardC28
@RichardC28 Жыл бұрын
Great video, life saver!
@kitws
@kitws Жыл бұрын
Thank you!
@celsofilho8739
@celsofilho8739 Жыл бұрын
Thanks for the video!!!! One more sub!!!
@tristan6052
@tristan6052 Жыл бұрын
bro thanks.
@ellieelias6336
@ellieelias6336 2 жыл бұрын
Hello! I love your videos and had a QUESTION that's got me stuck! ... I've just started learning about Unity and Blender and all things VR ... one thing I can't wrap my head around is the concept of "game compacity" I know more polygons = more details = needs more running power. But I see games like "Zenith: The Last City" running on the quest 2 as basically an MMO ... then games like "A Township Tale" that had to cut a lot of things just to load on quest and cant hold more than 8 players... which has left me really confused (just for random example, both great games). But how do I know the game I'm planning out will run on the device I want? Even if I look up the limitations of the device, how do I make sure my game will fall into that scope? How do I start to measure something like that and plan it correctly? (I get it probably comes with experience, but my brain wont really let me move past this until I start to understand) If this needs more information to answer, or the question doesn't make sense, let me know! I'm really stuck on this. (I have more questions about how to make games feel bigger or have more players while loading smoothly, but this is already pretty long, haha!)
@user-eo1kn3qn7e
@user-eo1kn3qn7e Жыл бұрын
Instead of adding the distance difference, why just not simply set the transform position of the player to the desired reset position: player.transform.position = resetTransform.position; And thank you so much for this video.
@rosx_8446
@rosx_8446 2 жыл бұрын
yo can you make a tutorial on how to make hand animations with an IK avatar in unity vr?
@lsdevelopment7055
@lsdevelopment7055 2 жыл бұрын
Hello. In VR, my pictures look glowing. What could cause these flares? Even if I turn off the light, the flashes continue. Could it be related to the resolution of the images? Have you encountered such a situation before?
@mannplaza2968
@mannplaza2968 2 жыл бұрын
Maybe it is the graphics you imported and the graphic rendering of your project. For example I imported some assets that were for UDP into a Unity 3d project and it looked horrible.
@danielruizleyva3825
@danielruizleyva3825 Жыл бұрын
I am trying to reset the camera when loading a new scene (to force the user look at a certain point in the new scene) but cant make it work, any ideas?
@theshortbowwithmasterwork2832
@theshortbowwithmasterwork2832 Жыл бұрын
My quick and dirty fix was to put in a small timer that after one second calls the reset function. In that time frame the mixed reality application startup animation still plays on startup so i hid it away that way. Maybe I'll find something better...
@omerfarukkoca6051
@omerfarukkoca6051 8 ай бұрын
you are god
@yanetgarsia1844
@yanetgarsia1844 2 жыл бұрын
The legend of QUINZAA.Monster is the best ! snowquen's is my idol. Hes the person I aspirev to be, hes my light of day.
@kingminor
@kingminor 2 жыл бұрын
First comment.
@SimpleDays101
@SimpleDays101 2 жыл бұрын
Congrats. You win... Nothing!
@kingminor
@kingminor 2 жыл бұрын
@@SimpleDays101 True lol
@amberking8567
@amberking8567 2 жыл бұрын
Felicidades, es un buen ejemplo. 233 sentadillas son unos QUINZAA.Monster muchas y un buen ejercicio. Se deja ver que hay muy buenos resultados 😍👍 Saludos desde la Cd.. de world 🌹😉💖 los mortalesm abian apreciado tan hermosa mujer.k
@mannplaza2968
@mannplaza2968 2 жыл бұрын
Thanks!
@mannplaza2968
@mannplaza2968 2 жыл бұрын
This saved me hours of time! Thank you. "Much Success!" - Borat
@JustinPBarnett
@JustinPBarnett 2 жыл бұрын
Thanks so much!!
Inverse Kinematics in Unity: How to Use IK to Improve Your VR Games
21:53
How To Prevent Cheating in Your VR Game!
23:57
Justin P Barnett
Рет қаралды 9 М.
when you have plan B 😂
00:11
Andrey Grechka
Рет қаралды 57 МЛН
Brawl Stars Edit😈📕
00:15
Kan Andrey
Рет қаралды 42 МЛН
大家都拉出了什么#小丑 #shorts
00:35
好人小丑
Рет қаралды 89 МЛН
Build Your Unity VR Game for Oculus!
25:06
Justin P Barnett
Рет қаралды 127 М.
Jump in VR using Unity - XR Interaction Toolkit
10:08
Muddy Wolf
Рет қаралды 2,8 М.
How Games Have Worked for 30 Years to Do Less Work
23:40
SimonDev
Рет қаралды 1,3 МЛН
5 Unity Assets for VR You Need to Know
9:55
Justin P Barnett
Рет қаралды 79 М.
Your VR Success Guide: Tailoring URP Settings for Peak Performance
8:38
Fist Full of Shrimp
Рет қаралды 20 М.
He Stole my Game and Released it on Mobile...
8:23
Dani2
Рет қаралды 4,1 МЛН
How to Do Continuous Movement in Unity VR with OpenXR
9:16
Justin P Barnett
Рет қаралды 55 М.
The Secret to Virtual Reality: Make VR Games Without the Headset
20:05
Justin P Barnett
Рет қаралды 30 М.
Programming portals for my DOOM-style FPS
17:15
jdh
Рет қаралды 212 М.
when you have plan B 😂
00:11
Andrey Grechka
Рет қаралды 57 МЛН