VR Game Template

Yet again thanks I finally got my DK2 over the weekend and your templates have helped alot, I especially like the new lock on weapons in the space shooter template. One thing I did notice was that when you change the effects settings all the asteroids blow up at once, not sure if is script related or something the engine is doing.

[=Chillybody;136577]
Yet again thanks I finally got my DK2 over the weekend and your templates have helped alot, I especially like the new lock on weapons in the space shooter template. One thing I did notice was that when you change the effects settings all the asteroids blow up at once, not sure if is script related or something the engine is doing.
[/]

Yeah I believe that’s an engine issue, it’s actually happened since 4.1 I think, I was hoping it would get fixed but I might have to submit a bug report.

Thank you for this!! You have saved us. I use the DK1 with UE4 and Love to see what I make come to life. Getting blueprint has re-ignited my flame of creation!! Thank you!!

hi all ! nothing happen for me with dk1 on 4.4.3 ! compatibility problem ? thanks in advance

[=84rt-design;145985]
hi all ! nothing happen for me with dk1 on 4.4.3 ! compatibility problem ? thanks in advance
[/]

Interesting, do you know if it is a template specific thing or can’t you get any project to work?

Any you could go into more detail about attaching a headlamp- how would I go about rotating it to the camera’s forward vector like you mentioned? Or would you consider integrating it into a future build?
Thanks again for all your work on this.

Just another “Thank you” for putting together. Was able to play around with it morning on my DK2. looks good!

[=integration;150801]
Any you could go into more detail about attaching a headlamp- how would I go about rotating it to the camera’s forward vector like you mentioned? Or would you consider integrating it into a future build?
Thanks again for all your work on this.
[/]

is how I would do it

Amazing, thank you so much

Hi ! Thanks for your work !
I’m currently working on a VR + Hydra project.
However i noticed some issues. I played and finished the Lost in the Rift demo, and i’ve not been sick at all despite we have to rotate -(the entire pawn, not only the head)- a lot in corridors. Unfortunatly in UE4, i felt sick very quickly when rotating. I found it a bit weird, then i experimented a bit, and found that pulling the camera back of 5 or 10 units reduces dizziness a lot (at least to me).

Also, how did you setup the IK for the body ? i’d like to use to rig the hands to my controllers!
Thanks!

Edit: By the way, i’m a bit confused with the “controller” class thing. I have on one side the VRController, and should also have an HydraController. Currently, i’m doing it anotherway, i created an actor for the Hydra that contains all the controls of the hands an functionnality, and set it asa child in the Exploration Character. It works but i’m not sur it is the good way…

[=;153428]
Hi ! Thanks for your work !
I’m currently working on a VR + Hydra project.
However i noticed some issues. I played and finished the Lost in the Rift demo, and i’ve not been sick at all despite we have to rotate -(the entire pawn, not only the head)- a lot in corridors. Unfortunatly in UE4, i felt sick very quickly when rotating. I found it a bit weird, then i experimented a bit, and found that pulling the camera back of 5 or 10 units reduces dizziness a lot (at least to me).

Also, how did you setup the IK for the body ? i’d like to use to rig the hands to my controllers!
Thanks!

Edit: By the way, i’m a bit confused with the “controller” class thing. I have on one side the VRController, and should also have an HydraController. Currently, i’m doing it anotherway, i created an actor for the Hydra that contains all the controls of the hands an functionnality, and set it asa child in the Exploration Character. It works but i’m not sur it is the good way…
[/]

Ok for the IK I recommend looking at the Space shooter template as it has interaction between the steering wheel and the players hands, basically what you want to do is get the world position of the hydras and set them as a variable in the AnimationBlueprint of your character, then in the AnimGraph setup the IK.
IK01.JPG c12a1a4127a576cec35f2728287c5074bf2fba8d.jpeg
The effector location pin is the location of the thing you want the hand to hold,
The joint target is just a thing that the IK needs to get accurate bending see for how it works
The IKBone is the name of the end bone you want to IK, the hand in your case.
The Effector location space is saying what kind of location data your putting into it for the IK (i.e. is it a world position or relative to the player) if it is interacting with any object that exists in the world I generally use World Space.
I would also think instead of using IK to rotate the hand just use ‘transform bone’ and rotate the hand to always lock to the hydras

As for the controller, it is not like a physical controller it is just where the logic for controlling the player is, what it is meant for is you have the Pawn which is like the 3D dude running around, but you also might have a car that that dude can get in. The car is a different Pawn and you can swap between the dude and the car at runtime but what happens if we want to keep some of the same variables between the dude and car, well we can store them in a player controller that will remain the same no matter what pawn it controls. At least that’s how I understand it, feel free to correct me.

Alright just a quick update I added 0.4.2 which fixes a couple of bugs with DK2 positional tracking but also adds the ability to view the camera bounds for tracking
to do just hold down ‘c’ in game


check it out here https://.com//UE4FirstPersonVRTemplate/releases/tag/V0.4.2

Thanks, i got it sort of working !
4a8Pz0xhvAY

I got to make a component in the HydraActor BP, and send their coords and rot through BPI because referencing a HydraActor in the anim graph was causing “Accessed None blabla” issues. So i got it working the other way. Works pretty fine , but when docked, it keeps the last position, so i will have to make a “when hydra docked or disabled, ignore rigging” thing.

Got little funny problem also ^^

It happens even without Hydra. I think i is because it gets no HMD location so the rig goes crazy, but it’s working fine in the anim preview… If you have a quick fix it would be kind :slight_smile: otherwise i’ll sort it out myself .

Thanks again

[=;154522]
Thanks, i got it sort of working !
I got to make a component in the HydraActor BP, and send their coords and rot through BPI because referencing a HydraActor in the anim graph was causing “Accessed None blabla” issues. So i got it working the other way. Works pretty fine , but when dock, i keeps the last position, so i will have to make a “when hydra docked or disabled, ignore rigging” thing.

It happens even without Hydra. I think i is because it gets no HMD location so the rig goes crazy, but it’s working fine in the anim preview… If you have a quick fix it would be kind :slight_smile: otherwise i’ll sort it out myself .

Thanks again
[/]

Would you mind sharing how you get the world or character space positions/rotations of the hydra controllers (converted from base-station relative)? I need to set up for my project but don’t want to have to laboriously debug the whole thing myself.

If you want, I can help with your anim problems there (Skype screen share and figure it out) in return.

@

I was using your previous First Person Rift Template but now would like to use your latest Template with my project. Could you possibly explain how I could integrate my project using the latest Template of yours as I see there are some improvements.

Thanks in advance.

[=;156528]
@anonymous_user_b255ac231

I was using your previous First Person Rift Template but now would like to use your latest Template with my project. Could you possibly explain how I could integrate my project using the latest Template of yours as I see there are some improvements.

Thanks in advance.
[/]

If you haven’t made any changes you could migrate from the new template into the old one and just replace the files, I changed the name of the character to just “ExplorationCharacter” in the new version so just use that instead of the old one and you should be good to go.

Ok thanks I’ll give that a go.

@, have you noticed any strange behavior with the visibility trace in the rift? My implementation is a little different (using interface-based events to trigger gaze interaction rather than actor/component tags), but the Single Line Trace by Channel node is set up the same. Everything works perfectly when playing in the editor. But when I launch (or run from a package) I get weird bursts of traces every so often, plus some other inexplicable behavior.

Is there any particular reason you took the tag-based approach for gaze interaction?

Thanks for tutorial. Until a few days ago I never thought much about VR but lately I have been interested in making a small project with VR. What hardware do i need to buy to get started before I study your lesson? Do I need to buy a Occuls Rift? If so is there a model I should get that works with UE4?

Thanks!

[=Venged;157324]
Thanks for tutorial. Until a few days ago I never thought much about VR but lately I have been interested in making a small project with VR. What hardware do i need to buy to get started before I study your lesson? Do I need to buy a Occuls Rift? If so is there a model I should get that works with UE4?

Thanks!
[/]

You need the buy the Development Kit 2 (DK2) from www.oculusvr.com to use your UE4 software in VR. It’s $350 (+shipping) and has a 6-8 week waiting time, so you’ll only want it if serious about VR, (it’s in short supply as is only meant for developers, but that didn’t stop loads of non devs buying one lol). It also happens to be a thing of beauty, even in early state.

If you want to wait for the finished (Consumer) version which will be MUCH better, expect mid-late 2015 or later.