[TUTORIAL] Using thumbstick locomotion with the standard VR template

So how would you do the Room Scale Rotations? I didn’t understand the note.

You need to perform a roto-translation of your pawn, so that the camera rotates in place regardless of its offset from the pawn’s origin (and the VR Origin parented to it). It is not difficult to achieve once you become familiar with the language of coordinate transforms.

Say that your Pawn’s hierarchy is Root Component –> VROrigin –> VRCamera. Assuming the VROrigin has no relative translation/rotation respect to the Root Component of your Pawn, then the transform to apply to the Root Component of the Pawn to place the VRCamera in the world with a specific translation/rotation is given by:

T’ [RootComponent–>World] = T [VRCamera–>VROrigin]^-1 ⊕ T’ [VRCamera–>World]

where

T’ [RootComponent–>World] is the transform to apply to the root component (aka roto-translation) in world coordinates
T’ [VRCamera–>VROrigin]^-1 is the inverse of the relative transform of the VRCamera respect to the VROrigin
T’ [VRCamera–>World] is the desired final position of the VRCamera in world coordinates after the transform has been applied

⊕ stands for the composition of transforms, which can be achieved with the Blueprint node Compose Transforms. To get the inverse of a transform, you can use the Invert Transform node. Mind the fact that the sequence of the transforms matter (the composition of transforms is non commutative).

What is ‘speed of movement’ and how to get it, or find it, or make it , or??? I see it in your example, but have no idea how you GOT it there,…??? Also, everything,. Like the strange box AFTER ‘speed of movement’ with an X in it? That could take a newbie YEARS to randomly find! (or,… not,. , I NEVER find those ‘weird’ boxes people put in their ‘Tutorials’ (which kind of makes them: ‘PUZZLES with no COVER IMAGE’, NOT ‘TUTORIALS’ doesn’t it?
(or: RUBIK’s engine?)

Your questions clarify that you have no basic understanding of Blueprints and how they work. That is why I already recommended you, multiple times by now, to follow a basic BP intro before attempting anything more complicated, otherwise you will get yourself into an endless loop. To your questions:

  • Speed of Movement is a float variable (you know it is a float from its green color). You create it by clicking on the little + button next to Variables on the left. Again, this is very basic BP understanding.
  • The “blocks” with a x in the middle are multiplication nodes. You get them by right clicking on an empty space in the Event Graph and pressing the start “*” key on your keyboard, then selecting “float * float” because you want multiply a float by another float. Again, this is very basic BP understanding that you would get from any introductory BP course.

Again, I strongly recommend you to spend some time to get yourself a basic working knowledge of BP’s and programming in general instead of blaming others because you don’t understand what they are writing. You are acting like someone wanting to read a book in a foreign language you never studied nor understood but, instead of learning it, you blame the author because he has written it in that language.

Please can all members familiarise themselves with the Forum Rules/Code of Conduct (https://forums.unrealengine.com/unre…ode-of-conduct).

I have removed some posts to prevent anymore rants and/or flame wars. Warnings/Infractions have been issued where necessary.

Thanks guys for this amazing tutorial! I have used it again in the past!

One question that i have, if someone can help me.

This tutorial makes a very “linear” locomotion movement. While in vr when you move you feel the movement straight and unnatural. Is there an easy way to give this locomotion a more natural swaying movement, such as a human would make when walking in real life. Most of first person games have this the past few years, i am not sure how to describe this better since english is not my first language!

Thanks a lot, if you could help me i would be much obliged!!

Michael

Provided that what works for a first person/third person game may be annoying in VR (head wobbling etc.) the simplest way to achieve what you ask for is to use a looping timeline and add its output to the movement code, in combination with the output from the thumbstick.

This is a reference to get you started: https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/Timelines/index.html

I would love to see your code for this. I am using two different types of teleportation so it would be nice to have my capsule stay with me at all times so I can walk around with my other teleport.