Kodeco Forums

How to Create a Simple FPS in Unreal Engine 4

In this Unreal Engine 4 tutorial, you will create a simple first-person shooter. You will learn how to create a first-person character that can fire a gun and how to damage other actors.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/228-how-to-create-a-simple-fps-in-unreal-engine-4

Tommy I just found this tutorial and it looks awesome. If it is anything like the tutorial you wrote on the unreal engine before with the gumpa character with anims and stuff it will be great. I will give you my feedback once I finish. Thanks so much again !

Tommy there is a bug somewhere in your tutorial. I first noticed this when you removed a yellow pin line output from Getworldlocation into the start location in the shoot function, which originally was fed a vector by using the fps camera->getworldlocation->Start Location pin of the Shoot function. I noticed something was wrong when you used an image to show the whole overall process we achieved where you can now see in the image that start location in the Shoot function has nothing going into it. I am not sure if this was intentional or not because I did not see it mentioned in the article. However now, whether or not I plug fps camera->getworld into the start location or not it doesn’t work any more. Here are the image url for both so you can see what I am referring to:
https://koenig-media.raywenderlich.com/uploads/2018/01/unreal-simple-fps-45.jpg
//https://koenig-media.raywenderlich.com/uploads/2018/01/unreal-simple-fps-46.jpg
Please let me know how to solve this problem so I can continue with the tutorial, as I am now stuck here.
BTW when I tried to put the url of both images, it says I am limited to putting only one image since I am a new user. That is why I have the two forward slashes in front of the second image. Looking forward to hear from you soon. Thanks.

Hi malospam,

Good catch on the screenshot! I’ve updated the picture so that FpsCamera.GetWorldLocation now feeds into Start Location.

It should work after you have plugged it in. Have you made sure that the default value for CanShoot is true? if in doubt, you can download the complete project linked at the bottom and check to see what’s different.

Thanks for reading the tutorial!

Hey Tommy, I realized that CanShoot was false by default. When I had it as true by default when the project started it worked. And of course I reconnected the world location as you mentioned and it worked. Thanks!

@tommytran Thanks for the tutorials. Never tried seriously to do something on unreal, but with this I can get started. When will we have more of those? :smiley:

We’re currently working on graphics-related tutorials (next one should be up in a few weeks). If you’d like us to create more “How to Create x” type of tutorials, just let us know in any of the comments sections and we’ll put it on the wishlist :grinning:

Maybe a tutorial with the whole flow for a character creation(modelling, rigging, animating, importing to UE4). Obviously by modelling I mean at a very basic level, but knowing how to work with the whole flow may be very valuable.

Also, a “How to Create a VR Game in UE4” tutorial would be awesome. Specifically for Cardboard since it is the most accessible/cheapest and imposes the most limitations therefore making it (relatively) simple to build a game for, as opposed to Daydream w/ the controller or something crazy like Vive.

This tutorial is more than six months old, so questions are no longer supported at the moment for it. Thank you!