03-22-2022 07:06 AM - edited 03-22-2022 07:08 AM
Hi, I want to use UE4 to build a “jogging in place” locomotion system. Could anyone please let me know where to start learning how to do this? There is a "swinging arm" locomotion blueprint example provided in the ue4 oculus fork. I was thinking of using that to expand on, but I can't find the actual source code, so I don't know how they implemented it. Mainly, how did they deal with capuring the pysical motions of the controller/hmd, such as accelleration?
I’m very familiar with coding; and I bought a few ue4 c++ courses on Udemy that were geared towards VR development such as the following: https://www.udemy.com/course/unrealvr/
But all of these tutorials simply demonstrate how to implement a teleportation system and nothing else. Could someone provide me with some insight on how to implement this system in ue4?
Thanks.
03-24-2022 10:19 AM - edited 03-24-2022 10:19 AM
I tried this once in Blueprint. On tick track the difference in position of the motion controllers and convert that distance to an impulse in the first person char blueprint. If I remember well, I created some sort of energy 'bar' that the movement-impulse was added into and that the movement was maxed out at some value. When stopping moving your arms, the energy would drain the bar and you would stop after a few steps.
Problem with just tracking the delta-movement was that it didn't matter in which way your arms would swing as long as there was a delta movement. Surely will be a better way to do this
08-22-2022 08:57 AM - edited 08-22-2022 08:58 AM
Hi MaxArch, I get what you're saying with the energy bar and I would like to build on that idea. But I would also like to integrate head movement into my implementation alongside the controller (or hand tracking) movement. How do people usually go about doing this? Like, is there some kind of API that is used to get the controller and headset's acceleration and pitch? I'll probably be implementing my solution in C++ since I haven't been using ue for long enough to get comfortable with blueprints yet (although if I can get the same results and it's easier I might as well use blueprints).
08-23-2022 12:06 AM
Maybe have a look at the Oculus Examples on Github (you need to make a github account). You'll find a locomotion example project with all kinds of locomotion options - also one with swinging arms. The same principle can be applied to head movement I guess.
See here: https://github.com/Oculus-VR/UnrealEngine/tree/4.27/Samples/Oculus
You'll find a video describing the examples here https://www.youtube.com/watch?v=j9aqZIF5cDc&t=11s
08-25-2022 08:46 AM
Thanks. Do you know if there are c++ implementations for the arm swinging locomotion sample? I only see blueprints.
08-25-2022 11:53 AM
Sorry, cant help you there. Why not try doing it in blueprints - for prototyping its great.
10-21-2022 11:53 AM
Check the VR Expansion plugin's implementation:
https://vreue4.com/