Download

Fix Camera behind player

I’m making a third person game using the Third Person Template from the unreal engine launcher. I’ve set up the camera and crosshair, but the tutorial i’m following (i am extremely new to game development) calculates what the bullet impacts using crosshair position. How can I fix the camera behind the player character, so that when the player rotates their mouse, their character rotates with it?

That would be a 3 stage process… First have you set up your user input? “Project Setings → Engine → Input → Bindings → Axis Mappings” Then add an axis mapping for MouseX and MouseY.

Then in your Player Controller Event Graph, add the input nodes InputAxis MouseX and MouseY (or however you named your MouseX/Y axis mappings). I seem to remember these input event nodes have output values of ~ -50/0/50 depending on your mouse move speed… I’m not sure what functionality the default camera manager has, so you might want to create your own Camera manager by going to “Add New → Blueprint Class → Then In the All Classes drop down type in → Camera Manager” and then add any advanced custom camera control to that.

Below are 2 screenshots of a quick way to make the character (and camera) rotate with mouse movement, this goes in your player controller event graph without the need to make your own custom camera manager (just using the default one) (the second image allows you to move the camera around without the character moving) :