how to animate a fps character so that it looks up and down according to the mouse movement

hi. i m new to unreal. i made a character and a gun in blender for a fps game . i gave it all the general animations (walk,run,jump,reload,etc),but when we move the mouse left or right in a fps game the whole character rotates, but when we look up or down then only the upper body moves,since this depends on how much we move the mouse,we cant animate it in blender.so how do i do that?
i am making a fps for first time.pl help me out :slight_smile:

Hello @Sarthakbakre1999,

Short Answer: You’re going to have to learn how to use UE4 Animation System.

Long Answer: We’re developing a True First Person/Third Person Shooter in which Head, Upper body (Arm/Weapon), Lower body can be manually or procedurally controlled interchangeably on demand. We’re taking advantage of UE4 IK features to pull most of this off. However, for the Head, we merely rotate skeleton mesh head bone along with the camera rotation when manual control is used. If you need the Head to look at a specific object just rotate it with a LookAt node.

So it has nothing to do with animation in blender right.

I am really new to all this…can u help me out?
i want to create a fps prototype(just a player shooting stuff).

  1. I created the player, the gun ,the general anims.
  2. i export it to unreal.
  3. i made a level.
  4. i dont know what to do next.

I know c++ and i also know unity, but i cant can unreal.

If you know any tutorial or a paid course for learning this complete fps game…pl let me know

if you want your character to aim up and down depending on where the mouse is pointed, you would need to take a few still poses of your character looking straight forward, straight up, and straight down… you could do this by taking your default aiming animation, taking a still pose out of that, repositioning the pose to looking straight up, then reposition it to look straight down, take those three poses and put them in an “aim offset”… then when you look up and down, your character will aim up and down to follow

Thanks… i will try that .but wouldn’t it be extreme up and extreme down . Will it follow in between any position?

yeah, it’ll blend between the poses depending on how far up or down you are aiming… you can add left, right, up left, up right, down left, and down right aiming poses into an aim offset as well, but you would have to do some coding so that your feet stay still until you’ve moved beyond a certain degree left or right… but that isnt important, most games dont even do this, just get up and down working first

Alright . Thanks …

You can add trasmform/modify bone node to the animation blueprint and set that node to target the neck. Node can be set to replace existing rotation or add to rotation. Drive it with a float value from your pawn/character blueprint; the camera pitch angle should be easy enough to save.