UE4 Blueprint FPS - VR in game logic?

Started by
0 comments, last by Scouting Ninja 7 years, 6 months ago

I am hoping somebody in this community can provide an answer to something that is bugging me.

I am trying to get a good grasp of how to use the blueprint system in the UE4 editor. So I started by making a FPS blueprint example project. I was reviewing the blueprints provided when I noticed that for every section of input, there seems to be a separation into two branches. Where keyboard vs analog is concerned this makes perfect sense because the input is entirely different.

Then I looked in the spawn projectile section of the code, and saw there are two branches for selecting the transform of the projectile to be spawned. I can't fathom a reason that the gun offset isn't used in both scenarios.

Why would the motion controllers be abstracted out of the game logic in this section? How is it the example wouldn't have the motion controllers alter the camera and or gun offset, and thus continue to use the first branch for spawning projectiles? Why are two necessary?

Here's that branching I mentioned, sorry if the text is too small.

[attachment=33642:blueprint.PNG]

Advertisement

I am trying to get a good grasp of how to use the blueprint system in the UE4 editor.

I find the best way to think of it is as pieces of pre-made code that you are just stitching together.

How is it the example wouldn't have the motion controllers alter the camera and or gun offset

The motion controller part finds the location of the controllers, if I am not mistaken a similar code should be attached to the hand holding the gun, so it moves with the motion controller.

The Camera could be used however the controllers allows you to move your "hands" around on screen, meaning that the gun could change where it is positioned. Watch a few Unreal, VR controller vids to see how they move relative to the camera; It's like moving your hands in front of your face.

Just ignore the VR if you don't need it now, you can add it in later if players want it.

This topic is closed to new replies.

Advertisement