Implementing a True First Person camera

Sure, but if you feel loss then you should start looking at other tutorials first. My system is not very complex and is based on what already exist in UE4.

I’m mainly just confused as I’m used to BP and haven’t done much with scripting since C Sharp a while ago in unity. Does your guide assume you’ve made your own custom player controller and character c++ classes? Or is all the code you’ve written able to be added to the ones that come in the fps/third person unreal projects?

I’ve gone through it again and feel the actual system set up I understand from beginning to end. What’s in my way is how to start. Like do I import the third person c++ template and socket the camera to the characters head bone? Problem with this is I can’t edit the playercontroller.cpp and the UpdateRotation() from your step 1 as it’s read only. So would I copy paste the .ccps and .hs of the third person project into my own files to start?

​​​​​​Edit: I’ve been doing more learning and have made custom character and controller classes. Think I’m understanding the work flow more now. The input functions you’ve made that are binded to the mouse input confuse me though. I’m looking at how it’s done in the third person example and the input is handled through Apawn whereas yours is EPC, AYourCustomController.InputAddYaw (or close to that I don’t have visual studio open right now). I’m not sure how I get my input in the character class to run the add yaw and pitch functions in my custom controller.

Hello all,

Ignore these last two posts of mine I’ve just about set up the system. One issue I had is that my animations where going funky but I think that’s my fault so I’ll look into that myself. One thing that I can’t figure out is how the character can strafe and turn. I assumed the head was oriented in the mouse direction based off the additive poses. But the end result has the character strafing left and right whilst the head faces forwards. Is that just a case of those strafing animations being side on to begin with? And how is turning handled? It looks like you can move the head to look around without reorienting the character. But in Mirrors Edge fashion moving the head far enough to the right or left will cause the player to shift on their feet and I assume the control rotation at the same time. This doesn’t cause the players head to move even further though so is there some complex function to handle that?

If the character and the controller are not turning at the same time, you can achieve the freelook, but then you need to handle the body rotation when you rotate the head too far. I didn’t include that in the tutorial because my method doesn’t work well yet. So I have a custom function that tracks my two rotations and force the body to turn and re-align with the head/camera when needed.

When strafing, the body turn quickly to align with the camera. In which case using a blend space for your strafing animation should do the trick.

I know it’s been nearly a month, but could you not just implement the Turn In Place method showcased with the paragon characters?
Seems to work well enough for my socketed or not socketed cameras even if I still get motion sick because of the animation sway’s.

Examples at the bottom of this.

You may need to implement aim offset with a blend if you need your feet to not be the additive pose

the layer blend is on pelvis bone, depth 1, with rotation blend checked. The root yaw offset is driven by the actor rotation. You’ll figure it out if you follow the vids or break apart the sample project. If you haven’t already.

Overall, it really sucks that most marketplace animations drive me to puke when in first person, so I’m still after a proper solution to eliminate that all-together… Right now I’m thinking of just locking the head bone in place and have the camera handle rotation.
In a mirror this would probably cause the neck to stretch up and down, and in a multiplayer game it might also look odd, so it’s not a perfect solution to the problem. comes close though, because I could go back to the way the first person template works and append the mesh to the camera instead…

Man, your implementation is really beyond awesome. The game “Close to the Sun” has something similar and it is really cool.
I´ve been trying to achieve this many many times, but always without success. Your tutorial give me the hope to try it again soon :slight_smile:

Please, i have one simple question: the animations you use (for the look aim offset and for the fall) are custom made or i can get it somewhere? Most of the animations i find does not fit well with the ideia of driving the camera movement.

Edit: one more simple question :slight_smile: : your movement is based on in place animations or root motion?

Thaks a lot for this great tutorial!

They are all custom made based on a custom rig.

I don’t use any root motion.

Ha maybe, I remember looking at their animation videos a long time ago, that’s something I should revisit to refresh my memory.

Hey, I’am only used to Blueprint, I have had the odd lesson on C++ but, i’m not super confident with it. I’m just wondering if anyone can help me out with this as I really want to use it but, do not fully understand it. I have done the animation step, adjusting the head in different directions however, whenever I get to the c++ part i’m just completely stuck. I don’t know which bits of code are supposed to go where. E.g. which part goes the in .h file. If anyone can help me get through this part please let me know :slight_smile:

Hi, can you make a tutorial video about true first person like in your blog?

Not trying to be a jerk at all here, as this is a fantastic tutorial; however, I created a tutorial on how to do the separate arms and body method that some people might like as an alternative to this one.

Tried your aimoffset c++ method on a fresh project in UE 5.2, it however did not work and resulted in that frame lag that was described. Using the method as described in the blog post however did work fine, which used the custom PreUpdateCamera() function.

We changed our animation blueprint and began to experience this issue.

Once I looked into it, turned out to be related to multi threaded animation

Aim values were being set in Blueprint Update Animation, too late for animation proxy in what ever thread it happened to be in.

Creating a custom animation instance and proxy solved it.

While we are using 4.27.2, the same issue would occur in 5.x if you’re aim values are also being set in Blueprint Update Animation.

Check out:

or