Got it all working in UE4.27 up to this point but decided I really needed to move it to UE5.8 as I prefer to learn and work with a fully supported version of the engine. In addition I noticed that the input system used here is listed as being depreciated and I also wanted to work with OpenXR as that seems pretty much standard now.
Has taken some time, especially geting my head round how to setup the new Enhanced Input system and learn all the key places components need to be referenced to get it to work, but happy to say it’s all working now. It’s a shame the course has not been updated for UE5 but it’s been a confidence building exercise to make the jump and figure out what needed changing. Probably more of that to come but hopefully I’ll manage to figure that out too as I continue the course.
Hi Ian,
The reason for not updating is it isn’t cost effective. VR is niche and even when popular it was less than 1% of developers chasing it.
The course itself as it stands is solid. There are some gotchas in 5.x - I certainly had everything running in 5.0 but tethered Unreal 5 needed such high specs compared to 4.27 meant it was abandoned and ultimately retired…sadly. Plus VR hardware has changed - UE 5.8 does not play well with the Quest 2 for example - it is almost impossible to hit the minimum 72fps needed. the HTC Vive was a solid headset, and even WMR which I had and was sunsetted about 18 months ago. New kit is really expensive too.
A short list of the input changes would help the next person taking this course. Even just where you added the mapping context and which components needed new references
Fair comment, VR is very much a niche marketplace but one that I’m particularly interested in none the less. I agree 5 is noticably slower than 4.27 and you really have to cut out nanite and lumen and still run with forward rendering if you want to take advantage of MSAA. Having said that I’m working with low poly assets for the game I’m looking to make so I am getting a steady 90 fps on a Vive Pro with a wireless connection, with about 6.5mS on my GPU (4070) coupled with lowish CPU usage, when running the packaged and exported game executable. Unlikely to maintain that as the game develops though … so will need to keep a close eye on the impact as I add more and keep my code well optimised.
The course is good. I’m learning a lot and appreciate the quality of the presentation.
The Enhanced Input system is great system once you gain familiarity with it.
I basically created an Inputs folder in my Content folder and created an Input Mapping Context. Then a sub folder for the Actions and created Input Actions for the inputs I needed to map ensuring their Value types were set appropriately. These can then be mapped to VR controllers (or any external input device for that matter) by creating the mappings in the Input Mapping Context.
In your code you need to create UInputAction pointers for each of the Actions you intend using and expose those to your character blueprint. For example:
You can then open your Character blueprint and in the Details pane under Input find your Move Action entry and select the appropriate action from the dropdown.
The bit that caught me out for some time was the fact that you need to go to the Enhanced Input Project Settings and map your IMC as a default IMC.
That completes the setup. Otherwise you set a pointer to a UEnhancedInputComponent by casting the PlayerInputComponent and then much the same as in the lesson bind the Action to your function to handle it.
Hi Ian,
The course is retired and archived and hasn’t been supported for close to 2 years now. Unless you actually have it, you can’t actually get it any more and not for the last 2 years either.
So there won’t be any changes and it is a shame. These days you need a quest 3, index or steam frame to similar device and support has to pick one as we can’t have everything. I mean, 600 euro for a quest 3 to start with and the lowest end of the scale. Also, by “demand” the team made aq unity vr course which was far more modern had to be retired after only a year and never got the student numbers needed to support it. Things changed by the time the course was released and in Unity style, broke everything with the release of 6.
90 FPS on a wireless Vive Pro with UE5.8 sounds pretty encouraging, especially after moving over from 4.27.
I think the tricky part might come later when the scene starts getting more complicated. A few extra effects or materials can eat into that VR performance budget surprisingly quickly.
I wonder if it would be worth keeping a copy of your current scene as a baseline, just so you can compare GPU timings as the project grows.
Also, that default IMC setting is exactly the sort of tiny detail that can leave someone scratching their head for hours. Nice that you shared it here.
Just one final thought for me. I am aware that the default skybox in 5.x can cause issues performance-wise. In a tethered environment you should be able to achieve 90-120fps without issue as long as you avoid high-poly meshes and particle effects (at least keep them simple/to a minimum) but pick one and lock it in. 90fps is plenty good.
Aside from that, the UE4 course works like a charm - the code is largely the same.
Nice work porting a 4.27 VR project all the way to 5.8, Enhanced Input and OpenXR are usually where people get stuck. One thing that saves headaches is adding the Input Mapping Context through the EnhancedInputLocalPlayerSubsystem when the pawn is possessed (PawnClientRestart or BeginPlay on the controlled pawn), so the bindings survive respawns and level changes. For performance, staying on the forward renderer with MSAA is still a good fit for VR, and keeping an eye on GPU frame time with stat gpu tells you quickly what eats your budget. Holding 90 fps on a Vive Pro is a good baseline to protect as you add content.
Just a heads up. Beware of scam phishing emails pertaining to be from GameDev.tv regarding a new post in this discussion directing you to an article that gives more information and providing a highly suspicious URL. I just received one and the post clearly doesn’t exist here!