Тёмный

Using thumbstick locomotion with the standard VR template - Unreal Engine 4 Tutorial 

Marco Ghislanzoni
Подписаться 8 тыс.
Просмотров 33 тыс.
50% 1

This step-by-step tutorial shows how to implement thumbstick (aka gamepad or joystick) locomotion as an alternative to teleportation in the standard VR template.
Two variations are shown:
1. Direction of locomotion following the HMD orientation
2. Direction of locomotion independent from the HMD orientation
In addition the VR Pawn is modified to add a collision capsule so it cannot go through other objects and walls.
*NOTE*: To keep it simple, this implementation is for a seated/in-place experience. Rotations will be inaccurate if you use it for a room-scale experience and start moving around IRL. This can be fixed implementing a roto-translation of the VR origin so the camera parented to it pivots around its vertical axis as expected. I may cover this in a future tutorial if anyone is interested.

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

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 252   
@caesaruwu
@caesaruwu 4 года назад
I have finish the tutorial but the locomotion is very lazy i want to upgrade the speed , do you know how i can do that
@marcoghislanzoni
@marcoghislanzoni 4 года назад
Take the output of the Y axis event (and X axis as well) and pre-multiply it by a float factor (say 2.0 or 3.0) before multiplying it by the Forward / Right vector. See at 5:00. That will make all your movements faster.
@chrisgo
@chrisgo 4 года назад
Thanks for this ... I just needed the AddActorWorldRotation bit so I can turn with my joystick but now do you make it so I can turn non linear/not continuous, as it makes some people feel sick in VR turning like this .... so how to turn in sequential moves same as you do in the occult home please?
@marcoghislanzoni
@marcoghislanzoni 4 года назад
This is called snap rotation. You can achieve it by adding a large rotation angle, say 30 or 45 degrees, to each movement and subsequent release of the thumbstick. What you don't want is to keep rotation if the thumbstick is held to the side. It's pretty easy to realise using a Gate in Unreal.
@chrisgo
@chrisgo 4 года назад
@@marcoghislanzoni Thank you, found my way with help from this info. Cheers!
@somnbody
@somnbody 2 года назад
This is the best format for a tutorial for me. I really appreciate the mention of good short keys and the clarity of what's happening on screen. I prefer this over a talk-over. Great Tutorial!
@thebutterappletutorials6553
@thebutterappletutorials6553 4 года назад
Thank for this! 1 issue, when i grab an object i cant move anymore. Actually, when the grip button is pressed at all i can't move. Any suggestions?
@dirkmandark
@dirkmandark 4 года назад
I have the same issue. Also looking to change the speed of walking.
@Nynex
@Nynex 4 года назад
Please sell this on the marketplace I would gladly pay 5-10$ I just bought one for 7.99 and it didnt do what I was hoping.
@marcoghislanzoni
@marcoghislanzoni 4 года назад
You get the tutorial for free! ;-)
@DamonLeonin
@DamonLeonin 4 года назад
I god damn love this dudes tutorials and his taste in music ;)
@marcoghislanzoni
@marcoghislanzoni 4 года назад
I hope we share the same taste for music dude! ;-)
@noxix7641
@noxix7641 5 лет назад
How would one change the speed that it turns or goes forward. Ex: Using trigger axis for forward movement, further one pulls the trigger the faster they go; and how would one adjust the top speed?
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
When it comes to control inputs, there are two ways to access them: 1) via events, like we are doing here, 2) by value. You can fetch the value from the trigger and use it to multiply the thumbstick value and a float which represents the maximum speed. That will both give you a boost option and determine the top speed.
@coffee-coco
@coffee-coco 5 лет назад
@@marcoghislanzoni i was about tyo ask that, readed your reply and i went to the projects input changed from 1 to 3 or -1 to -3 , and its working perfect, thank you very much.
@demodegaming6384
@demodegaming6384 2 года назад
Superb video thx
@Dude_Slick
@Dude_Slick 3 года назад
Any idea where I can find an actual tutorial, rather than a video that entails just watching someone else work?
@marcoghislanzoni
@marcoghislanzoni 3 года назад
Did you watch it all actually? It is a tutorial, just read the on screen explanations and follow them.
@ukkusu
@ukkusu 6 лет назад
thank you for sharing your knowledge :)
@marcoghislanzoni
@marcoghislanzoni 6 лет назад
You are welcome! :-)
@DrEffekt
@DrEffekt 6 лет назад
this tutorial is super!! thank you so much for it ! but i have a slight problem.. my y-axis values are inverted for some reason and i don't know where i can fix them from.. any help pls? (when i move the thumbstick up he goes back and vice versa)
@DrEffekt
@DrEffekt 6 лет назад
FIX: just multiply the y-axis output by -1.0 and plug that result into the Delta of the AddActorWorldOffset
@marcoghislanzoni
@marcoghislanzoni 6 лет назад
Yes, that may depend on the mapping of the thumbstick inputs. Glad you solved it.
@gerardogamboa2107
@gerardogamboa2107 5 лет назад
So i started having this same issue. And I can't seem to fix it. I fixed the floating camera issue and now my controls are inverted on the L joystick.
@DietPiss
@DietPiss 3 года назад
@@gerardogamboa2107 Same issue here
@adamlibby9842
@adamlibby9842 5 лет назад
I am having a weird issue where if you hold down the grab button, you can no longer move forward or right if your hand is within the capsule, but if it is outside the capsule you can move normally. Is there a way to fix this?
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
Adam Libby That happens because when you press the grip button it activates physics for the hands. Check your collision settings for the hand and the capsule. You can excluded physics actors from the capsule collision response. Or setup a custom collision response for both.
@adamlibby9842
@adamlibby9842 5 лет назад
@@marcoghislanzoni thank you so much!
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
@@adamlibby9842 You are welcome!
@gsrawson
@gsrawson 5 лет назад
@@marcoghislanzoni I am having this issue as well, but I cannot figure out how to exclude physics actors from the capsule. I have attempted to setup a custom collision as well with no success. Any help would be appreciated!
@flashpowr
@flashpowr 5 лет назад
@@gsrawson Same!!!
@naufalyudanar4117
@naufalyudanar4117 3 года назад
any explanation why my VRPawn keep going through wall and object but indeed collide with the pickup cube? did i miss any step?
@marcoghislanzoni
@marcoghislanzoni 3 года назад
Because your VR Pawn doesn't have a body and therefore cannot detect collisions with other meshes. Your VR hands however are set to collide with other physics actors, so they do. Have a look at my other tutorial about thumbstick movement for archiviz. That is closer to what you are looking for.
@naufalyudanar4117
@naufalyudanar4117 3 года назад
@@marcoghislanzoni thanks for replying! totally missed the ArchViz one, im gonna head up there. Once again thanks for the help:)
@shawheenmodirpour875
@shawheenmodirpour875 5 лет назад
thanks for making this tutorial I appreciate it! was just was I was looking for! Could you please tell me how to increase the movement speed of the VRpawn?
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
Shawheen Modirpour you are welcome! Just add a float multiplier between the input event and the Add Movement node. This has been covered already many times, please read my answers below.
@BR14Nx
@BR14Nx 3 года назад
I see two issues with this method. First, the VROrigin is inheriting from the Capsule. Which means, if you walk in your room the capsule won't follow, but stay in place with the VROrigin. Secondly, if you rotate the actor then you won't rotate on place (where your HMD is), but around the Capsule/VROrigin which can cause motion sickness. Is that right? I used another method to solve the first problem, but I can't find a way to solve the second as well. My VROrigin isn't inheriting from the capsule and vice versa. Maybe someone else found a solution to rotate at the HMD location? I tried to rotate the camera node around itself, but nothing happens.
@marcoghislanzoni
@marcoghislanzoni 3 года назад
True. This method does not support room scale. I have another tutorial on my channel about room scale snap turn. That’s what you are looking for.
@marcoghislanzoni
@marcoghislanzoni 3 года назад
BTW, the fact that this simple method does not support room scale is fully mentioned in the video description.
@BR14Nx
@BR14Nx 3 года назад
@@marcoghislanzoni okay thank you. I'll give it a try
@dichwerdesigns4547
@dichwerdesigns4547 4 года назад
I'm using Oculus Rift, and it isn't showing the MotionControllerThumbRight_X as seen at 2:44 ?
@marcoghislanzoni
@marcoghislanzoni 4 года назад
That is an input mapped within Project Settings --> Input. It has changed in the most recent versions and it may have a different name now. You can always define your own with that exact name and assign it to the right thumbstick X axis.
@MaxBrunnerArchitect
@MaxBrunnerArchitect 6 лет назад
very Nice Marco. It only works for flat surfaces though. Maybe you could expand the BP so you can walk stairs etc?
@marcoghislanzoni
@marcoghislanzoni 6 лет назад
Indeed, that's a limitation of the Pawn class and the way the movement is implemented. If you need extra capabilities like going up-down stairs, slopes, etc. you are better off starting from the FPS template which uses the Character Movement Component. Or you can change the parent class of the MotionControllerPawn to Character so you inherited those capabilities. If you do so, you also need to change the movement nodes to Add Controller Yaw Input for the rotation and Add Movement Input for the right/left, forward/backward.
@marcoghislanzoni
@marcoghislanzoni 6 лет назад
Just tried what I described above. Change the parent class of the MotionControllerPawn to Character, then replace the movement nodes with Add Controller Yaw Input and Add Movement Input. Add some stairs. You can walk up and down. Works like charm!
@MaxBrunnerArchitect
@MaxBrunnerArchitect 6 лет назад
Thanks for the additional explanation. In case someone else has trouble finding the reparent option; open the MotionControllerPawn blueprint, press File, Choose Reparent Blueprint.
@feikovandijk3080
@feikovandijk3080 4 года назад
Since I updated to 4.24 Add movement input doesn't work anymore, but Add world offset does. I havent changed any values, simply updated the project. Are there any solutions for this?
@marcoghislanzoni
@marcoghislanzoni 4 года назад
Few things to check: 1. That the input events are defined under Project Settings --> Inputs. 2. That they are producing input values (you can use Print String to check the Axis value). 3. That the input values are flowing all the way to Add World Offset.
@shydevil
@shydevil 3 года назад
i cant see my hands anymore
@marcoghislanzoni
@marcoghislanzoni 3 года назад
Make sure you didn't delete the part where the motion controllers are spawned within the MotionControllerPawn.
@VRExperiences4All
@VRExperiences4All 3 года назад
Thank you very much for the tutorial. Things like that are what is needed to give impetus to development in VR. On the other hand, when the VR hands are inside the pawn capsule and we grab, the free movement gets out of control. It goes backwards or even rises in the Z axis. I am sure it is a problem of collisions with the VR hands. Does anyone know how to fix it?
@marcoghislanzoni
@marcoghislanzoni 3 года назад
Adopt these settings for the capsule (root), that should fix it: imgur.com/a/fVzEQR1
@marcoghislanzoni
@marcoghislanzoni 3 года назад
And for the Hand Mesh inside the BP_MotionController
@IllGib
@IllGib 2 года назад
È possibile seguire lo stesso procedimento però usando WASD e mouse? Ho provato ad importare l'fps character nel template vr e viceversa ma nessuno dei due riesco a fare funzionare. Per farla semplice, stiamo cercando di creare in Ue una cosa come le Presentation di Twinmotion, l'ideale sarebbe riuscire ad aggiungere facilmente l'hmd al template fps, in modo da avere sia la vr che la 3d tradizionale da monitor in mancanza di un visore. Il teletrasporto sarebbe scomodo nel nostro caso trattandosi di piccoli appartamenti. È possibile o è troppo complicato?
@marcoghislanzoni
@marcoghislanzoni 2 года назад
È sicuramente possibile anche se con Unreal Engine 5 ci sono alcuni cambiamenti da considerare. Se volete qualche dritta contattatemi via Discord vr_marco#8894
@IllGib
@IllGib 2 года назад
@@marcoghislanzoni Dici che per ora è meglio lavorare col 4? Sono piacevolmente stupito dalla qualità dell'illuminazione del 5, praticamente senza fare niente con una hdri era già come lo velevo, mentre ricordo le ore a settare "inutilmente" i sample del raytrace e avere dei riflessi accecanti e macchie ovunque.
@marcoghislanzoni
@marcoghislanzoni 2 года назад
@@IllGib Dovreste riuscire tranquillamente anche con UE5, non vedo problemi di sorta.
@LeoDoesEverything
@LeoDoesEverything 2 года назад
Doesn't work
@marcoghislanzoni
@marcoghislanzoni 2 года назад
If you need help you have to be a bit more specific about what doesn’t work.
@scruffy9702
@scruffy9702 3 года назад
Hello, I know this is a stupid question but how do I make the player move faster? Thanks.
@marcoghislanzoni
@marcoghislanzoni 3 года назад
There are not stupid questions while learning. It is pretty simple, just take the value of the axis output and multiply it by a float > 1.0 (say 2.0 to double the speed, or 3.0 to triple it), then feed the result into the Add Movement function.
@scruffy9702
@scruffy9702 3 года назад
@@marcoghislanzoni Thank you ill give it ago, keep up the good content.
@scruffy9702
@scruffy9702 3 года назад
@@marcoghislanzoni Hello I couldn't get it to work, most likely because I'm still a newbie to this. Hate to be a pain but would you be able to send a screen shot on the right way to do it if you have time? Thanks.
@marcoghislanzoni
@marcoghislanzoni 3 года назад
@@scruffy9702 go to 4:20 and pause the video. You see the green line coming out of the red InputAxis event from the Axis Value pin. You need to disconnect that line, then take Axis Value from the input event and multiply it by 2 or more, then feed the result into the float x vector node (where, right now there, is a direct connection from the Axis Value pin).
@scruffy9702
@scruffy9702 3 года назад
I got it to work, thank you so much 🙂
@kjgrizzly11
@kjgrizzly11 3 года назад
I have this working extremely well thanks! But question, when I pick up items, (I'm on the quest 2 btw) with the default vr template. I can only move in one direction. If I grab something with my right hand, I can only move right. if I grab something with my left, I can only move left. And if I grab items in both hands, it freaks out. I've even flown. Any advice? I can't find anything in the blueprints that would make this happen.
@marcoghislanzoni
@marcoghislanzoni 3 года назад
That is very likely due to collisions. In the standard VR template when making a fist the physics/collisions of the hand are activated. How are you grabbing your items?
@kjgrizzly11
@kjgrizzly11 3 года назад
@@marcoghislanzoni I'm grabbing them using the default VR template settings. Grab/Release Actors. Since you have said that I have noticed that if I am holding an object in front of me I can backwards. Or if it's to the left of me I can move right. The same holds true the other way as well. So you're right, its collision somewhere. I haven't found it yet. But This is a step in solving it.
@stashorodnyansky1258
@stashorodnyansky1258 5 лет назад
how do I implement collision get the same position as camera? For now if I use HTC Vive and move in real world a little bit to the left from the center of my playroom the collision stays in center. How can i change that?
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
There are few ways to achieve what you are asking. The easiest is to use Mordentral's VR Expansion plugin which implements room-scale out of the box.
@raphaeljung9405
@raphaeljung9405 3 года назад
Thank you man :) realy good
@Quandinis
@Quandinis 5 лет назад
hey, any way that it is possible to rotate the player in room scale without it pivoting at the actor in the scene
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
Yes, you will need to implement a roto-translation using the camera as pivot point. See my forum post here: forums.unrealengine.com/development-discussion/vr-ar-development/1408924-tutorial-using-thumbstick-locomotion-with-the-standard-vr-template?p=1566009#post1566009
@MrVilboux
@MrVilboux 4 года назад
Very good tutorial. Thanks a bunch!
@Novalmauge
@Novalmauge 5 лет назад
How would one go about adjusting speed based on if the player is physically crouching or not?
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
You could detect if the camera Z is below a certain threshold and then adjust the input multiplier to the AddActorWorldOffset.
@christophersickler6374
@christophersickler6374 4 года назад
Marco, how do you use this with stairs? or ramps?
@rchlouis3599
@rchlouis3599 3 года назад
thank you, thank you, thank you :D
@robledorafaeldeandrade464
@robledorafaeldeandrade464 5 лет назад
HEY THANK YOU VERY MUCH, having problem to migrate those to another project not in VR template, some broken references in blueprint event graph, any help?
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
You may need to recreate the broken variables in the destination blueprint. They are not created automatically when you copy/paste from one blueprint to the other. Hard to tell without seeing what is wrong on your side.
@robledorafaeldeandrade464
@robledorafaeldeandrade464 5 лет назад
Fixed the camera spawn at the VR template by removing the motioncontroller spawn u teached at the video, and only letting start thing from ue4
@Caleb6801
@Caleb6801 4 года назад
Do I need to use the VR template or is this possible from a blank project? I couldn't figure out how to get negative values from the joystick and it was always just moving in one direction no matter the direction I moved the joystick.
@marcoghislanzoni
@marcoghislanzoni 4 года назад
You should start from the VR template. Which VR system are you using? You should use some Print String to check the values out of your input events.
@Caleb6801
@Caleb6801 4 года назад
@@marcoghislanzoni I'm using the valve index, I almost had it working my only catch was having the negative value come from the X input. It seemed that it always added positive and never negative no matter left/right.
@fredbeahm1714
@fredbeahm1714 5 лет назад
Hey Marco, quick question, is there a way to set this up so when the user turns in real life, say from pointing north to pointing south, when they press the joystick 'up' now it will go backwards. Is there a way to make it so it reads which way the user is facing and always have that be forward/straight/up?
@da_noob_09
@da_noob_09 5 лет назад
hey. did you get the answer to this?
@DavidDelGiudice
@DavidDelGiudice 3 года назад
Ciao Marco, dopo aver girato per giorni ho trovato questo tuo tutorial e sono riuscito a far ciò che dovevo, solo è rimasto un problema: quando chiudo il pugno sinistro il personaggio va solo indietro e a destra e se chiudo il pugno destro va solo indietro e a sinistra. Ho capito che è un problema di collisioni ma non so come risolvere...
@marcoghislanzoni
@marcoghislanzoni 3 года назад
Ciao David, prova cosi': seleziona la capsula del VR Character e nel pannello Details, sotto Collisions, invece to Query and Physics metti solo Query. Dovrebbe risolvere.
@DavidDelGiudice
@DavidDelGiudice 3 года назад
​@@marcoghislanzoni Ho messo solo query ma niente, non risolve...
@marcoghislanzoni
@marcoghislanzoni 3 года назад
Faccio una prova e ti dico
@marcoghislanzoni
@marcoghislanzoni 3 года назад
@@DavidDelGiudice Adotta queste impostazione per la capsula nel MotionControllerPawn e per la skeletal mesh della mano nel BP_MotionController imgur.com/a/fVzEQR1
@DavidDelGiudice
@DavidDelGiudice 3 года назад
@@marcoghislanzoni Grandissimo, così funziona!!! Grazie!!!
@SanderBos_art
@SanderBos_art 5 лет назад
Great tutorial. However i find the collision when i bump into walls frustrating. Movement imidiately stops and is not smooth like in the character pawn class. But when i use character pawn class grabbing gives me weird bugs it seems to interfere with movement. Especially with grabing objects and move the same time. Any suggestions for me?
@dinceraydn4057
@dinceraydn4057 6 лет назад
hi Marco do you use this tutorial for oculus go ? I need a help setting vr pawn that is using with one controller . Any tutorial or this video helps me ? Thank you
@mashonoid
@mashonoid 4 года назад
My Rift S controller only works with the rotation but it wont move forward or sideways. Please Help!!
@marcoghislanzoni
@marcoghislanzoni 4 года назад
Assuming your controller did not run out of batteries, can you use Print String to make sure the movement input is received? We can take it from there.
@TridentVruinzTheSniper
@TridentVruinzTheSniper 4 года назад
Doesn't seem to work with my rift s controllers either
@atmosphere_burns
@atmosphere_burns 4 года назад
@@TridentVruinzTheSniper it worked for me in one project, but does not work in another! Rotation worked, but not the movement. The Pawn is at the ground level, everything is exactly the same as in the other project. It is so frustrating.
@adrianerdelpuente1441
@adrianerdelpuente1441 5 лет назад
I followed the tutorial but just start the test, the character begins to walk and left, what do i do? Please help!!
@igolubb
@igolubb 5 лет назад
You added vector + float instead of vector * float. had the same mistake!
@eleathyra
@eleathyra 5 лет назад
Thank you, very useful! I noticed that I get "blocked" as soon as the terrain is not 100 % flat though. Any suggestion for solving this problem, so it's possible to go up a hill etc.?
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
Did you try with my Archiviz version of this tutorial? That supports slopes and stairs.
@eleathyra
@eleathyra 5 лет назад
@@marcoghislanzoni Yes, I actually found that one a while later - much better solution. Thanks a bunch! :)
@DietPiss
@DietPiss 3 года назад
I have read all of your answers responding to people who had an issue with player speed. You said you add a float. Where exactly do I add this and which float? I am very much a noob at this. Can I get a screenshot?
@Matthew.1994
@Matthew.1994 5 лет назад
as soon as i use the grab buttons to grab something, the characet just flys backwrd as soon as i want to move
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
KleytenHD it's due to the collision between the object you grab and the capsule. You need to set the collisions for the object so that it doesn't affect the capsule.
@Matthew.1994
@Matthew.1994 5 лет назад
@@marcoghislanzoni the thing is that it happens even when i dont grab any object I just hold the grab Button so that the Animation plays. Then i fly backward
@KoDomanov
@KoDomanov 4 года назад
Hello Marco! I need to make sure that the user himself can choose how to move him. Can you do such a lesson? I need to be able to switch from teleport mode to normal motion mode. Thanks.
@marcoghislanzoni
@marcoghislanzoni 4 года назад
You can define a boolean bUseTeleport variable to switch between teleport and thumbstick locomotion, so instead of disconnecting the teleport branches you use a Branch based on that variable. It is not complicated. I may cover this in a future tutorial.
@KoDomanov
@KoDomanov 4 года назад
@@marcoghislanzoni That would be very cool! Look forward to. Thanks!
@edcreg
@edcreg 5 лет назад
Hi, i have a little issue, when i begin playing, my camera just starts moving on its own and i cant control the player. it does stay on the ground anymore Kindly help
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
My best guess is that you have some collisions between your VR Pawn and something else (your VR hands?) going on. This should not be the case with the standard VR template, but if you are applying this to a different project it may be the case.
@chunkytoads4509
@chunkytoads4509 4 года назад
Thank you for putting out this tutorial @Marco Ghislanzoni :) It has helped me greatly! It works very well on flat surfaces... Do you know why there might be any issue using this movement setup over a sculpted landscape (one made directly in Unreal)? For some reason pawn works great on flat landscape, until landscape has been sculpted to have hills etc. Then if falls through collider entirely. Can't find solution anywhere online.
@marcoghislanzoni
@marcoghislanzoni 4 года назад
You are welcome! Regarding your question, have a look at my thumbnail movement ArchViz tutorial. That one uses a Character which has the capability to move on non-flat surfaces like terrains, stairs, etc.
@chunkytoads4509
@chunkytoads4509 4 года назад
Issue SOLVED: Just leaving this note for others having similar problem... It looks like the HMD guided locomotion shown in this video works perfect as is (even for sloped areas and landscapes). Problem was on my end and involved the collider of another large object in level, which was disrupting my pawns collision with landscape (switched that objects colllider setting to 'ignore only pawn' and it resolved problem fully.
@TridentVruinzTheSniper
@TridentVruinzTheSniper 4 года назад
Movement doesn't work for Oculus touch controllers. Anyone have a fix?
@marcoghislanzoni
@marcoghislanzoni 4 года назад
Are you using the Oculus Go?
@TridentVruinzTheSniper
@TridentVruinzTheSniper 4 года назад
Marco Ghislanzoni Using the Rift S
@marcoghislanzoni
@marcoghislanzoni 4 года назад
@@TridentVruinzTheSniper That's really strange because I am not aware of any change in the way the input is handled. Did you check whether you are getting any output from the input event node? You can use Print String for that, the information will go to the log window.
@TridentVruinzTheSniper
@TridentVruinzTheSniper 4 года назад
@@marcoghislanzoni Ended up getting it to work after starting a new fresh project. I guess I must've inputted something wrong the first time around. Thanks for the help.
@MobeastGaming2
@MobeastGaming2 3 года назад
im having this weird issue and i've repeated the tutorial multiple times. My camera just rotates on it's on to the right. I dont have any other gamepad connected that would interfere. I have even started a brand new project and it still does this. If you can please help me out!
@marcoghislanzoni
@marcoghislanzoni 3 года назад
When do you start to get the weird rotation? From the very beginning or after you modified some of the code? Which HMD are you using?
@MobeastGaming2
@MobeastGaming2 3 года назад
@@marcoghislanzoni wow thanks for the quick response! After I completed your tutorial , I launched the VR preview, I'm using the Oculus Rift S.
@marcoghislanzoni
@marcoghislanzoni 3 года назад
@@MobeastGaming2 double check the code at 2:49. Test the system immediately after having added that part of the code and before you add the rest.
@MobeastGaming2
@MobeastGaming2 3 года назад
@@marcoghislanzoni i went ahead and added the code at 2:49 and nothing else. I keep rotating/spinning to the right.
@marcoghislanzoni
@marcoghislanzoni 3 года назад
@@MobeastGaming2 does it do the same with the standard VR template? Completely default project?
@TheJohnRudy
@TheJohnRudy 5 лет назад
So i followed this method, and the HMD following made the character fly. I split the structure pins from the vectors and connected all but the Z axis and that helped out but now I'm not able to walk up stairs. Any suggestions on how to add that? I'm trying to combine this with your climbing tutorial.
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
The capability to walk up the stairs is given by the Character Movement Component. See my ArchViz tutorial if that is what you need.
@TheJohnRudy
@TheJohnRudy 5 лет назад
@@marcoghislanzoni For some reason I just can't get the thumbstick locomotion and climbing to work together. Pawn or Character sets. Are these tutorials Unreal version spesific? I have the 4.22 version atm installed.
@Eve_Panda
@Eve_Panda 5 лет назад
same problem
@arnaudvalenza6909
@arnaudvalenza6909 5 лет назад
Thanks Marco for this very good vidéo !!! do you know how to place en png image in front of the eye player when he walk to avoid motion sickness ?? thanks a lot !!
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
Look into VR Stereo Layers: docs.unrealengine.com/en-US/Platforms/VR/DevelopVR/StereoLayers/index.html
@kitokage
@kitokage 4 года назад
I have just one question, How do you change the speed of locomotion ? (in video it seems really slow) ^^ I begin my training on UE so maybe it's not slow in VR
@marcoghislanzoni
@marcoghislanzoni 4 года назад
Just multiply the output axis by a float variable greater than one. This will make you faster.
@DietPiss
@DietPiss 3 года назад
@@marcoghislanzoni I have increased the Z from -1 to -10.0 and it is still very slow
@matmichniewski2827
@matmichniewski2827 5 лет назад
Everything works perfect except collision. I can walk through the objects and even walk outside the stage. I have followed the tutorial 3 times and problem still occurs. Any ideas guys?
@issicsilva5502
@issicsilva5502 5 лет назад
I came across the same problem, would also like to know how to fix this.
@jordant3512
@jordant3512 5 лет назад
Probably your capsule isn't where u think it is. You have to sync the headset IRL position with the capsule position. I usually put an input (motion controller l grip 1) as reset VR. Then in character BP Reset Vr- set position and orientation (of HMD)
@JazzManMilan
@JazzManMilan 5 лет назад
How would you add a sprint functionality to this system? I understand the logic of it (if button is held change speed to x) and I'm already using a float multiplier to set a default speed but not sure about sprinting.
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
You can use your sprint button to assign a higher value to the speed multiplier. And when the sprint button is released you restore to original sprint multiplier.
@JazzManMilan
@JazzManMilan 5 лет назад
Thanks I'll try that! I swapped out my brush floor for a real plane and now only the rotation works.. any clue?
@erikmendez7003
@erikmendez7003 5 лет назад
Hello! I love this tutorial, it should be a base template setting for VR! I do have a question if anyone might know, im having trouble fixing the collision with the capsule and the VR hands when they are held in the "Grip" animation it causes me to move around and even change the camera angle permanently. Im a noob with UE4 so im learning as I go. Thanks ahead of time!
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
What is the current collision profile of the character's capsule?
@erikmendez7003
@erikmendez7003 5 лет назад
@@marcoghislanzoni The collision profile is under the preset Pawn, generate overlap is checked, can character step up on is 'No', collision enabled query and physics
@mkrick
@mkrick 6 лет назад
Thank you so much, I've been trying to find a good tutorial for the past two days to cover this.
@timezone5784
@timezone5784 3 года назад
noice. smort
@rafaelmoraes99
@rafaelmoraes99 5 лет назад
the collision does not work because of movement with the sensors :/
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
Sorry, I don't get your problem. Can you try to described it differently?
@digitalillusioncalo
@digitalillusioncalo 5 лет назад
Try enabling "sweep" in blueprint (target actor)
@CanalDojogames
@CanalDojogames 6 лет назад
Hello my friend,i want to make the same as you did but could it work if the camera is away from character like 3rd person? i setuped without making your blueprint yet,it rotates the camera and we dont want it ofcourse will make motion sickness right? So thank you! your video will help me alot!
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
This technique only works if you stand in place or are sitting, it is not a room scale setup. If you need a room scale setup, you need to have a different setup where the collision capsule follows the camera. Also the rotation needs to take place around the current position of the VR camera, which is equivalent to a roto-translation of the entire character. A bit too complicated to explain it here. If you need room scale, you may want to consider the VR Expansion Plugin by Mordentral.
@CanalDojogames
@CanalDojogames 5 лет назад
@@marcoghislanzoni so im thinking on Oculus quest track sistem but for now i want to make something like the game "Moss" and Astrobot, more on Astrobot where the câmera follows the character and we Control the character. I tryed something like that but the character bring rotation from its body to the câmera. What i want is more what You did but instead of move only the câmera i want to move the character "Linked"
@CanalDojogames
@CanalDojogames 5 лет назад
@@marcoghislanzoni i mean i want to be standed. But move a 3rd character along side camera, both linked
@chamixenn5388
@chamixenn5388 6 лет назад
is this game can turn left,right with vive normaly? or can turn by only thumbstick???
@marcoghislanzoni
@marcoghislanzoni 6 лет назад
Do you mean if this method supports room-scale movements? Then the answer is no. You can still move room-scale, but the collision capsule will not follow you. That would require a different arrangement.
@chamixenn5388
@chamixenn5388 6 лет назад
Thanks! what about speed can i adjust it? how?
@marcoghislanzoni
@marcoghislanzoni 6 лет назад
Sure. I have answered this question here: forums.unrealengine.com/development-discussion/vr-ar-development/1408924-tutorial-using-thumbstick-locomotion-with-the-standard-vr-template
@chamixenn5388
@chamixenn5388 6 лет назад
Thank you so much sir :-)
@petercollins8833
@petercollins8833 4 года назад
Thanks
@kkarpoyzhs
@kkarpoyzhs 5 лет назад
Hi Marco and thanks for your amazing videos they are really helpfull! If i may ask you a question, can you think of any reason why i dont have the "Input Axis ThumbRight_x and _y only the ThumbLeft as an option?
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
Μιχάλης Φουντουκλής you are welcome! Check under Project Settings --> Inputs. If it is not there, you can add the mapping yourself by adding an axis event and linking it to your Thumbstick input.
@kkarpoyzhs
@kkarpoyzhs 5 лет назад
@@marcoghislanzoni Thank you for the reply! It was indeed a problem with my inputs! If i do not trouble you a lot, i managed to setup the right oculus touch into rotating correctly, but the left touch controller doesnt do anything. I have tried this both in my project, and a fresh new VR template project with your locomotion movement events in pawn. Only the Left one that controls the movement doesnt seem to work at all. The rotation is fine. Do you have any idea why this might be the case? I dont get any errors in compile
@kkarpoyzhs
@kkarpoyzhs 5 лет назад
No worries, i am (apparently) braindead. I had forgot to connect the axis thumbLeft x and y to the world offset.... I am sorry to take up your time! :)
@thequazzman
@thequazzman 5 лет назад
Hi, Marco. Thanks for making this. You're making my life a whole lot easier. An issue I'm having though is that I believe my default camera position is somewhere in front of the capsule collider as I can phase through some objects when moving forward for a bit but not moving sideways. When I rotate, I also seem to be rotating from a pivot point that is anchored somewhere else. I tried to do a Reset player position and orientation on start but I end up in the floor. Any suggestions for how to fix this?
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
Are you using a room scale setup? The rotation technique is not suitable for room scale. For the other issues, it is difficult to tell what is going on without seeing what is happening. You can contact me on Unreal Slackers (Discord) as vr_marco if you need more help.
@thequazzman
@thequazzman 5 лет назад
@@marcoghislanzoni Hi again, Marco. Just as a follow up, I was able to fix my issues by simply changing the tracking origin of the hmd to eye level instead of floor and also using a ResetOrientationandPosition node on beginplay
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
@@thequazzman Good!
@ThunderWorldInteractive
@ThunderWorldInteractive 5 лет назад
So How would Hills and Mountians work with this locomotion, also how do I make myself move faster?
@ThunderWorldInteractive
@ThunderWorldInteractive 5 лет назад
Also with the Rotation RoomScale IRL Movement, a tutorial on that?
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
Yes it will work properly. To move faster, just multiply the output of the move forward event by a float > 1.0.
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
Gaming Technologies room-scale movements are a bit more tricky to obtain. I may indeed do a tutorial on that sooner or later.
@landonshultz
@landonshultz 6 лет назад
Any tips on sprinting? Sprinting based on if the face is clicked in rather than being touched.
@marcoghislanzoni
@marcoghislanzoni 6 лет назад
You can use a speed multiplier for that. It is normally set to 1.0, but gets set to 2.0 or 3.0 if the face is clicked or a sprint button is pressed. When the sprint button is released, you set it back to 1.0. This will achieve a sprint effect.
@landonshultz
@landonshultz 6 лет назад
Thanks for the speedy reply! I figured it out. Have you thought about doing a crouching tutorial? Getting the players height, adjusting speed based on the height of the headset (60% lower than the player previously set height or so).
@Medicbobs
@Medicbobs 5 лет назад
This is awesome man thanks. Super easy to follow. How can I increase the speed of the walk?
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
Slim Shady Just multiply the axis output value by a float greater than 1.0 before feeding it into the move call.
@Medicbobs
@Medicbobs 5 лет назад
@@marcoghislanzoni Thanks for the fast response!
@NextWorldVR
@NextWorldVR 5 лет назад
@@Medicbobs Now this is the kind of guy to send Paypal $ or Patreon. How very cool!
@SuperMontana2008
@SuperMontana2008 6 лет назад
This is great for arch viz..can you do tutorial like this standing up real world scale?
@marcoghislanzoni
@marcoghislanzoni 6 лет назад
Not sure I understand what you are looking for. Can you describe it more in details which problem/use case you are trying to solve?
@SuperMontana2008
@SuperMontana2008 6 лет назад
Marco Ghislanzoni you mentioned it's for seat down experience and rotation will be off real world scale? Could you do tutorial on player standing up using real world scale?
@thereal_owain6778
@thereal_owain6778 6 лет назад
just dont mess with the controller height
@gennaroscalia8213
@gennaroscalia8213 3 года назад
Ciao! come posso cambiare la velocità di movimento? Grazie per il tutorial :) chiaro e molto più accessibile di altri in giro.
@marcoghislanzoni
@marcoghislanzoni 3 года назад
Devi moltiplicare il valore in uscita dall'evento di input per un float maggiore di 1. In questo modo amplifichi l'entita' del movimento.
@gennaroscalia8213
@gennaroscalia8213 3 года назад
@@marcoghislanzoni Grazie mille per la risposta, e scusa se approfitto della disponibilità data la mia ignoranza(sto inziando ora con la VR) in questo caso se mi muovo con il pollice del controller sinistro moltiplico il valore in uscita da MotionControllerThumbLeft sia X che Y?
@marcoghislanzoni
@marcoghislanzoni 3 года назад
@@gennaroscalia8213 Dipende da quale movimento vuoi amplificare. Se quello di spostamento avanti ed indietro devi moltiplicare il valore del rispettivo asse. Se sia avanti indietro che destra sinistra allora devi moltiplicare entrambi gli assi (separatamente anche se per lo stesso valore).
@gennaroscalia8213
@gennaroscalia8213 3 года назад
@@marcoghislanzoni Grazie davvero :) ultima domanda poi non ti disturbo più giuro, posso chiederti come ti sei formato per entrare in questo mondo, magari qualche libro o fonte che possa darmi delle basi solide ( insieme ai tuoi tutorial ovviamente ;) )
@marcoghislanzoni
@marcoghislanzoni 3 года назад
@@gennaroscalia8213 in italiano non c'e' molto onestamente e quello che c'e' spesso non e' di qualita'. Prova a cercare tramite Google o su RU-vid. In inglese invece c'e' molto di piu' sia come libri che come risorse ufficiali, a partire da learn.unrealengine.com dove potrai trovare moltissimi corsi a tutti i livelli. Se vuoi maggiori info contattami su Discord - Unreal Slackers, mi trovi come @vr-marco. Ciao buone feste!
@amin7264
@amin7264 6 лет назад
Thank you so much!
@WolverineTheInsider
@WolverineTheInsider 4 года назад
Same issue here, I am using oculus rift and I did try the print string and it keeps printing the default debug message. plz help
@marcoghislanzoni
@marcoghislanzoni 4 года назад
You need to connect the output of the controller input event (red box) to your print string so it shows which value it's being generated. Otherwise it will keep printing the default message.
@WolverineTheInsider
@WolverineTheInsider 4 года назад
@@marcoghislanzoni for InputAxis MotionControllerThumbLeft_X and InputAxis MotionControllerThumbLeft_Y it is printing 0.0
@WolverineTheInsider
@WolverineTheInsider 4 года назад
@@marcoghislanzoni it also changing to 1 and -1 in both axis for InputAxis MotionControllerThumbLeft but for some reason just not moving
@marcoghislanzoni
@marcoghislanzoni 4 года назад
@@WolverineTheInsider Check in Project Settings --> Inputs. Check the MotionControllerThumbLeft_X and Y axis events. What are they linked to? They have to be linked to the respective X and Y thumbstick events of your left motion controller.
@WolverineTheInsider
@WolverineTheInsider 4 года назад
@@marcoghislanzoni they are linked to their respective buttons. and the yaw is working fine. I did try your [ArchViz] Thumbstick locomotion tutorial ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-EtEYIh9ndkc.html and in that the locomotion was working properly.
@thereal_owain6778
@thereal_owain6778 6 лет назад
Yo, so because of the BlockAllDynamic collision, i cant move
@marcoghislanzoni
@marcoghislanzoni 6 лет назад
That depends on how you built your level. In general it should work, otherwise you can always change the collision presets or even create a custom collision channel to handle your special situation.
@thereal_owain6778
@thereal_owain6778 6 лет назад
Marco Ghislanzoni my level is the default vr level
@marcoghislanzoni
@marcoghislanzoni 6 лет назад
OwainTheMod So it is in the tutorial and it works properly. Anything else you may have done differently?
@thereal_owain6778
@thereal_owain6778 6 лет назад
Marco Ghislanzoni hmm, I didn't move the camera as I wanted to be able to walk around rather than be sat down
@marcoghislanzoni
@marcoghislanzoni 6 лет назад
Ok, understood. This technique is suited for a sitting/stand in place experience. If you want to be able to walk around IRL and have your collisions still work properly, you need to use a plugin which handles room-scale movements like the VR Expansion Plugin by Mordentral: forums.unrealengine.com/development-discussion/vr-ar-development/89050-vr-expansion-plugin
@bobcharlotte8724
@bobcharlotte8724 5 лет назад
Thank you so much dude xxx
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
You are very welcome!
@digitalillusioncalo
@digitalillusioncalo 5 лет назад
Ciao Marco, è possibile aggiungere un movimento di inerzia come se si fosse in assenza gravità? Grazie ancora
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
Si' e' possibile. Usa Finterp dall'output del motion controller thumbstick left X per settare l'entita' del movimento orizzontale. Se usi un tempo di interpolazione basso, ci mettera' un po' a partire ed altrettanto a fermarsi, simulando una sorta di drag iniziale ed inerzia finale.
@digitalillusioncalo
@digitalillusioncalo 5 лет назад
@@marcoghislanzoni Grazie per la tempestiva risposta! Ho impostato Finterop to al motion controller thumbstick left X su "current", devo modificare "Interp Speed"? ho provato alcuni valori ma non mi apporta modifica. Grazie!
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
@@digitalillusioncalo Devi creare una variabile float per salvare Current mentre Target e' l'uscita Axis dall'evento del motion controller.
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
@@digitalillusioncalo Tipo questo: 1.bp.blogspot.com/-4l9Wb2MrAPM/WMnpfkr0kuI/AAAAAAAAC84/IMY6V1wa4cw4zvt6J0i9IxKOnvkVMhesQCLcB/s400/11a_bpc3_interpto.png
@digitalillusioncalo
@digitalillusioncalo 5 лет назад
@@marcoghislanzoni guarda questo è il mio progetto facebook.com/digitalillusioncalo/photos/a.1548951271820881/1900081673374504/?type=3&theater grazie per la tua disponibilità!
@Eve_Panda
@Eve_Panda 5 лет назад
im confused my character just flies
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
Check your collisions.
@Eve_Panda
@Eve_Panda 5 лет назад
@@marcoghislanzoni thanks for the really quick reply and also not sure why but it works when removing the z axis from 1.0 like you had to 0.0
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
@@Eve_Panda Z axis of what?
@Eve_Panda
@Eve_Panda 5 лет назад
@@marcoghislanzoni the z axis on the project vector on to plane node from get camera
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
@@Eve_Panda That part is meant to keep you walking on a plane parallel to the floor, so it is using the [0,0,1] plane to project onto. You should end up with a vector that only has the X and Y components and Z=0.
@unclejesseppe7323
@unclejesseppe7323 4 года назад
thank you!!! :) consider maybe putting in a bit of music?
@marcoghislanzoni
@marcoghislanzoni 4 года назад
Why? You can play your own. ;-)
@unclejesseppe7323
@unclejesseppe7323 4 года назад
you make a good point :D
@kellyliu7539
@kellyliu7539 6 лет назад
Is it possible to make the movement follow the rotation of the controller itself instead of the HMD? (I'm using Oculus Rift controllers)
@Medicbobs
@Medicbobs 5 лет назад
That's what he did at the end of the video...
@whythovr6888
@whythovr6888 5 лет назад
is there a way you can make the forward direction where ever the player is looking? thanks for the vid though!
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
WhyTho yes, just replace the actor forward vector with the camera forward vector in the move forward code. You are welcome!
@whythovr6888
@whythovr6888 5 лет назад
@@marcoghislanzoni alright so now i have an issue where if I move forward but am looking down a bit the VR player starts to move down and eventually through the floor. Same for looking up, you start flying... Did I do something wrong?
@whythovr6888
@whythovr6888 5 лет назад
You know what I did do something wrong. In the Z axis of the "project vector on to plane" was 0. My bad.
@marcoghislanzoni
@marcoghislanzoni 5 лет назад
WhyTho no, that is actually right. You can use the node Project Vector onto Plane to remove the Z component. Use 0,0,1 as the plane and feed it with the camera forward vector.
@whythovr6888
@whythovr6888 5 лет назад
but now I'm having issues with the collisions. I'm able to walk into and through any thing. Any ideas? Will turning the vr pawn into a character cause an issues?
@fuckyougoogle555
@fuckyougoogle555 4 года назад
collision detection doesn't work with brushes and the capsule always on the right side, I use Rift S with room setup ...
@marcoghislanzoni
@marcoghislanzoni 4 года назад
Watch my Archiviz tutorial on the same topic. That one works with brushes too.
@bigfuckingteddybear
@bigfuckingteddybear 4 года назад
Dear Marco! Could you make a tutorial about a roto-translation of the VR origin when the camera parented to it pivots around its vertical axis, as it was written in the note, please? And could you cover turning with tumbstick at some angle (like in oculus home locomotion), for preventing motion sickness? Please!
@marcoghislanzoni
@marcoghislanzoni 4 года назад
Yes, it will come soon!
@marcoghislanzoni
@marcoghislanzoni 4 года назад
BTW, the tutorial on room scale rotation is now available. Check it out!
@kmj1137
@kmj1137 6 лет назад
Hi. Just subscribed. I found you on the Unreal forums. I'm currently trying to produce a VR demo for my portfolio so I'm looking forward to reviewing your tutorials.
@marcoghislanzoni
@marcoghislanzoni 6 лет назад
Thanks for the subscription and good luck with your project!
Далее
DAXSHAT!!! Avaz Oxun sahnada yeg'lab yubordi
10:46
Просмотров 388 тыс.
КАК БОМЖУ ЗАРАБОТАТЬ НА ТАЧКУ
1:36:32
Enchanting: Minecraft's Worst System
27:14
Просмотров 45 тыс.
Why Slopes are Shockingly Difficult for Indie Game Devs
17:20
Unreal Engine - VR Optimization
13:49
Просмотров 17 тыс.
New Fear Unlocked
8:37
Просмотров 3,3 млн