Тёмный

How To Recenter in VR - Unity Tutorial 

Valem Tutorials
Подписаться 38 тыс.
Просмотров 14 тыс.
50% 1

Want to reset your player position and rotation ? This video is for you !
❤️ Support on Patreon : / valemvr
🔔 Subscribe for more Unity Tutorials : www.youtube.co...
🌍 Discord : / discord
🐦Twitter : va...
👍 Main Channel : / @valemvr
🔥 Tiktok : / valemxr
····················································································
📝Best VR Assets ( These links are Affiliate links which means it costs the same to you and I get a small commission. Thanks for your support!)
VR Interaction Framework
assetstore.uni...
Hexabody (Physics VR Player)
assetstore.uni...
Mirror and Reflection for VR
assetstore.uni...
Auto Hand (automatic hand grab pose)
assetstore.uni...
Hurricane VR (vr physics interaction)
assetstore.uni...
3d Hand Model for VR
assetstore.uni...
····················································································
Full Series on How to make a VR game • How to Make a VR Game ...
····················································································
If you enjoyed this video, here are some other really good channel you should appreciate :
⌨️ Game Dev
Brackeys : / @brackeys
Dani : / @danidev
Code Monkey : / @codemonkeyunity
👨‍🎓 Vr Dev
Justin P Barnett : / @justinpbarnett
Vr with Andrew : / @vrwithandrew
····················································································
#vr #vrdev #madewithunity

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 30   
@we.are.ready.official
@we.are.ready.official 11 месяцев назад
Greetings from Ukraine! Thank you so much for this video. Everything is clear, understandable, and of high quality)
@EscHatchStudio
@EscHatchStudio 4 месяца назад
I couldn't solve this problem any other way - thank you so much for this great video!
@rahmatriyadi3201
@rahmatriyadi3201 Год назад
amazing tutorials, i hope the next valem tutorials is about adding sound in unity vr like footsteps or grab sound
@ValemTutorials
@ValemTutorials Год назад
Thanks for the feedback. If you're interested in sound design in vr i already have a tutorial about it on the channel :D
@MythHead
@MythHead Год назад
Amazing!!! (first)
@kelpez
@kelpez Год назад
Cant wait till the vr spectator camera tutorial
@ulyanchiksin5778
@ulyanchiksin5778 Год назад
Thank you, thank you so much!❤
@kelpez
@kelpez Год назад
NICE! Very useful!
@wissalwissal3157
@wissalwissal3157 Год назад
Hi do you do personal trainings to beginners ? I’m interested
@TheARTofMining
@TheARTofMining 6 месяцев назад
You do some great videos Valem thank you for them - 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
@yagneshkrishnan2544
@yagneshkrishnan2544 4 месяца назад
were you able to resolve it?
@TheARTofMining
@TheARTofMining 4 месяца назад
@@yagneshkrishnan2544 yes ,, using // Create a TeleportRequest with the target position and rotation TeleportRequest teleportRequest = new TeleportRequest() { destinationPosition = WayPointSetList[WayPointSet_CTR].transform.position, destinationRotation = targetRotation }; // Queue teleportation request teleportationProvider.QueueTeleportRequest(teleportRequest); // Get the current camera rotation Quaternion cameraRotation = Quaternion.Euler(0f, MainCamera.transform.localEulerAngles.y, 0f); // Rotate the XR Rig's XROrigin to face the correct direction after teleportation, considering camera rotation PlayerXR_Origin.transform.rotation = targetRotation * Quaternion.Inverse(cameraRotation);
@TheARTofMining
@TheARTofMining Месяц назад
@@yagneshkrishnan2544 Yes using TeleportRequest
@kopefw
@kopefw 23 дня назад
@@TheARTofMining // namespace using System; using UnityEngine.XR.Interaction.Toolkit.Locomotion.Teleportation; // inside a function TeleportRequest request = new(); request.destinationPosition = target.position; request.destinationRotation = target.rotation; request.matchOrientation = MatchOrientation.TargetUpAndForward; teleportationProvider.QueueTeleportRequest(request);
@Ser_Nikos
@Ser_Nikos Год назад
Amazing tutorial! I had a problem: I didn't call the Recenter() function when I pressed the primary button. My goal was to call it in the Start method of the scene, but for some reason, I had a problem with the rotation. So, the solution I found was to create a simple coroutine that waits for around 0.1 seconds and then calls the Recenter function in the Start method. If anybody has another solution, please let me know.
4 месяца назад
I have the same problem and still looking for a solution beside a waitforseconds :-/
@НикитаМордик-к8ф
@НикитаМордик-к8ф 25 дней назад
Thanks a lot, this help me a lot. But when recenter is complete, the collider of player is not align with recenter point.
@SamSamTutorialMan
@SamSamTutorialMan Год назад
Exactly what I needed! Thanks Valem!
@EstebanPabloPerez
@EstebanPabloPerez 9 месяцев назад
Hi!, Is there any way to combine it with the re-centering button of the oculus controller? because when I hold it down it gives a strange rotation due to the fact that the XROrigin has been rotated to match the target transform and the oculus re-centering always places the camera towards the XROrigin's forward. Thank you very much.
@A_walk_in_the_park
@A_walk_in_the_park 6 месяцев назад
Very nice tutorial, thank you. I have a problem though. The code positions camera very nicely to selected location, however, my CharacterController of the XR rig is still in a completely different location than the camera. How would one fix this?
@Saar58
@Saar58 Год назад
Great tutorial as always, couldn't find anything like that online! :> also worth mentioning - if you have UI following your XR camera (HUD), please make sure the scene "input system ui input module" has XR tracking origin, the script offset my ui intercation raycast without this reference.
@FileTh1rt3en
@FileTh1rt3en Год назад
I have a question in regards to additional buttons. You show how to add the Recenter button but how can we extend the Interactors/Interactables system so we can send more information to held or hovered objects by pressing other buttons. With the base XR Interaction Toolkit only Selected and Activated are supported but let's say you wanted to add the primary and secondary buttons to the InputActionAsset and then you wanted to be able to send those values to the interactable held, how would you go about doing that in a clean and reusable way? An example might be for a gun, you can grab it (select), you can shoot it (activate), but how would you allow primary button to be slide lock release and secondary button to be magazine drop?
@edoardopignatelli5128
@edoardopignatelli5128 Год назад
at the beginning of the video there is the driving simulator. Are you planning to make an updated tutorial of it?
@QuoteoftheDay-q7r
@QuoteoftheDay-q7r Год назад
everyday i always glad that valem always update his video, it helps me with my college about game and VR .
@piratemin_vr
@piratemin_vr Год назад
Great vid, very useful but I'm sure you've posted a video very similar to this before - I literally followed it for my own project a few weeks ago!
Год назад
Justin P Barnett has a recenter position video maybe you are referencing that one.
@piratemin_vr
@piratemin_vr Год назад
@ You may be correct! Thanks!
@matthewduncanson8744
@matthewduncanson8744 Год назад
Could you please make a tutorial on vr enemies that follow the player and do damage when close and if possible add making a health bar
@xr3y798
@xr3y798 Год назад
can you make a granade where you have to pull the pin to activate it
@jehadahmedmahmoud8754
@jehadahmedmahmoud8754 Год назад
how to make main menu in vr ?
Далее
How To Make a VR Multiplayer Game - Unity Netcode
23:12
How to make a Hand Menu - VR Tutorial
14:24
Просмотров 37 тыс.
Training AI Bots to Fight (they started dancing)
15:06
Просмотров 285 тыс.
How to make a VR Button | Unity Tutorial
8:12
Просмотров 41 тыс.
Hand Tracking with Unity XR Interaction Toolkit
16:30
How do non-euclidean games work? | Bitwise
14:19
Просмотров 2,4 млн
The right way to pause a game in Unity
9:09
Просмотров 60 тыс.
How To Prevent Cheating in Your VR Game!
23:57
Просмотров 9 тыс.
2023 Unity VR Basics - Teleportation
11:12
Просмотров 11 тыс.
Making a Fake Multiplayer .io Game
11:03
Просмотров 135 тыс.
Jump in VR using Unity - XR Interaction Toolkit
10:08
Просмотров 2,9 тыс.
How to Make a VR Game WITHOUT a VR Headset
18:12
Просмотров 120 тыс.