Download

Free VR Template (All Blueprints)

Howdy folks. Here’s yet another VR Template. This one is free, made entirely with blueprints, and is aimed at newer developers.

There are two major features:

  1. Pawn Movement of every variety. Roomscale, teleportation, 360 locomotion (handles slopes, stairs, and obstacles gracefully), jumping, climbing, and vaulting.
  2. Interact-able item generation. Easily create items that can be picked up, thrown, attached, and even have sub-components that can be manipulated under variable constraints.

You can download the project files here. (google drive link)
Or the minimal zip file here.

You canview the video guide. (YouTube playlist)

You can ask for help in the discord channel.

Video of an in-game demonstration:

https://www.youtube.com/watch?v=HKCYinCC1tg

3 Likes

NICE!!!

Particularly love the Dr Evil chair :slight_smile:

Thanks man, I’ll have a look.

Hi mate, does it work with Steam Headset? I would like to use it in my projects.

Thanks
PAT

It should work with everything. I’ve tested it with the Valve Index over SteamVR and the Oculus Quest (in standalone mode). Let me know if you run into any issues.

This is a really great template and just the sort of thing we’ve needed for sometime now. There have been others but most are either outdated or overly complicated for getting up and running quickly. Being purely blueprints is even better so thanks for this.

I’m currently waiting for the HP Reverb G2 to be released and can’t wait to try it out. Hopefully it works ok with windows mixed reality headsets?

Have you checked out VR Content Examples?

There’s some good additions and things that would be great to have as a single vr pawn in there. It would be cool to be able to more easily turn on and off different features for a fps game.

Like recreating Half Life ALYX VR mechanics would be cool. Here’s a quick guide on the weapon/tool selection menu and he has some other interesting features that might be worth looking at.

Part 1 https://www.youtube.com/watch?v=cw431nRPNAY
Part 2 https://www.youtube.com/watch?v=mwNMKK86nKE

As far as I know, nothing in this template is hardware-specific (though you may need to change the tracking origin and hand/motion-controller offset, which is simple), so it should support any VR systems to the same extent that Unreal Engine does.

That would be neat, but I’m working on other projects now and probably won’t be adding much content to this one (with the exception of bug-fixes and perhaps updating to the next version of the engine), though I would be happy to link to any additions you create for it.

I don’t have much blueprint skills beyond the very basics from following tutorials. I watched your videos but unsure if it has snap rotation aka comfort turning?

Does teleport act the same as the official one with thumbstick turning as i never liked that? How do you get back the teleport arc and landing visuals? Thanks.

I recommend becoming more familiar with blueprints before continuing with this template.

It does have snap rotation.

Teleportation is activated by a button press, you can mess with that in the pawn blueprint.

The official template is included in a separate folder within this project, you can copy and paste over the teleportation visuals from there.

Thanks, nice complement to start with VR :wink:

I just got the chance to try your template and most of the features worked but it causes motion sickness due view lagging behind head position. I found out i need to enable lock to hmd on the camera. However turning that on causes the view to be well above the pawn which i’ve yet to figure out how to fix. Any ideas? Thanks.

Thanks for sharing, this is really useful for getting started on VR development in Unreal!

Any chance you might be able to help with the lock to hmd issue above?

Sorry for the late response, and thank you for the feedback. I’ll look into that, you’re not the only person who’s reported that issue (though I don’t see it myself, possibly because I’m just too used to testing laggy stuff in VR).

I’m in the process of refactoring the whole thing, as I found I needed to make a lot of changes for multiplayer and zero-g stuff, and I decided to change the way item interaction works to cut down on the number of actors. It will be a month or two before v2 is out, but I’ll have the anomalous HMD lag fixed as well.

That’s great to hear thanks for looking it’s appreciated. I still think this is one of the best templates for me as it just works with all the features you’d expect for a fps template and without needing plugins.

Do you know why “lock to hmd” is disabled as i believe that’s supposed to be on by default? If it’s no trouble will you be able to have a look and post a quick fix in meantime? No need for uploading a whole project just point us in the right direction on what needs changing so camera isn’t offset way above head position would do. That is if it’s a simple fix of course but no worries if not.

Edit: I have been trying to change things like eye height offset but hands were still not right location. Also changing camera position variables and subtracting a certain amount for testing. All i did there was bounce the view up and down every second. It may be a simple fix ill try to find but not knowing much about blueprints hopefully someone can help as this really is a great template.

I set up the camera movement differently so that it would be easier to do snap rotations, but I’m getting a lot of feedback that it’s causing too many problems.

I’m sorry to hear about how fragile the whole thing is (i.e. small changes break things). I am in the process of creating a new version from scratch that should be more robust in addition to having more features, but it’s just one component in my current project so I’m not able to give the new template my full attention.

Please bear with me for the next few months as I get it figured out; hopefully you’ll still be able to copy the modules that are working correctly and integrate them into your projects (I’d actually be interested to hear if anyone learned anything from these blueprints or used some of it in a project - that’s valuable feedback as well).

Just downloaded the project and had a quick look at it - Pretty good! Everything seems to work and is functional enough, but Ive got some notes and a couple questions that I hope you wont mind :slight_smile: Please excuse my manner of speech, I dont want to come off as too critical, just some friendly comments from one VR developer to another. Plus ive only had about 20 minutes to look at it, so im probably not understanding a few things.

  • The hands are really big! I know the default hands in the VR template are also oversized, but these seem even bigger. Not a game-breaker, but changing this could be tricky…

  • You have hand models in all of your pickups with animations set to blueprint but no animation blueprint set. Are you using these hand models just for reference or are you doing something like hiding the player’s own hands and making these hands visible to get the grip locations etc correct? In gameplay it seemed that the player’s hands were used, but the grip pose didnt line up with the grip of the gun so I dont know. If theyre not used, I would recommend removing them because extra components in actors can increase their load on cpu.

  • Your BP_VR_Pawn actor has a LOT of variables in it and a lot of them are only set once and then forgotten about. Instead of having the player carry around all this data all the time, it’d be better to store it in the gamemode or player controller and have those values set when the player pawn is spawned. For your boolean values that the player does need to carry around, Id recommend putting them in a struct so that the pawn has 1 struct of booleans instead of 30+ individual booleans. As an example, ‘OCHand Loc’ is set once in the setup function and then not touched again (as far as i can see). You could just use a value in the node, but if its a piece of data you really want to keep as a variable, youd be better of capturing a reference to the player controller at begin play and then just call on it for these variables if and when you need them.

  • Speaking of BP_VR_Pawn, theres a huge amount of functionality coming off Event Tick. I can see its all regulated by boolean checks, but its spaghetti and difficult to read. Despite the checks, the VR_Pawn is ticking as fast as it can, making these checks every single frame. The ‘Snap Rotation’ snippet for example, could be placed at the input event for the joystick instead of having the game check a boolean on every frame. Similarly with the ‘Movement’ snippet - there’s all these boolean checks being made every frame, CanMove?, IsFalling?, CapsuleHit?, Seated? etc. These checks could be made on a button push instead of being checked for at every tick. For an axis, you could use a boolean check to see if the value is 0 (as in no tilt on the joystick) and if its not 0, make the checks and move/rotate the player.

Maybe Im off base with some of that, just some thoughts I had looking at it.

Apologies for long post, great work so far, it runs well and is very functional :slight_smile:

Brilliant, well done! Thanks for taking the time to share, especially with those that are new to Unreal Engine and VR. This helps fast track productivity. Out of interest, have you accessed any live API data whilst in VR e.g. weather?

Wow thank you! looks exactly what i was looking for!!
I will give it a try!

Just wanted to say thanks for posting this. I’m looking forward to working my way through your setups. It’s incredibly helpful for someone who’s just starting out.

-Lee