True First Person aiming. making the gun and hands follow the camera movement

Hi everyone, if any of you can help me i’d be so grateful, I’ve been at this one problem for two months now on and off and still have no solution.

I’m making a game with true first person and I cant get aim offsets to work, all the tutorials out there are for third person and then when I change the camera to first it screws up (usually the character just looks straight down and doesn’t move from there)

I’ve been following this tutorial to see if this could solve my isssue: UE4 CustomWeapon Pt.10 [Aim Offset] - YouTube

another tutorial i’ve tried is this: UE4 #6 Using Aim offset with Unreal Engine 4 - YouTube

zip

I’m currently working from the First person example to see if that will help. with my skeletal mesh in the capsule with all his animations ready. I did have all the code from the aforementioned tutorials in there but because it hasn’t worked the last 400 times I’ve tried it now its gone so i can either start again or find a new solution.

Here are two solutions that are in my head but I cant find out how to implement.

1: use aim offset.
I have no idea why this wouldn’t work. I have all the poses, the offset works fine, the poses have the appropriate reference pose and mesh space / selected animation frame settings. just when activated it either does nothing or the character just looks at the ground while and doesn’t move even if the camera does. so they clearly aren’t talking to each other and I don’t know how to fix it.

2: parent the head and should bones to the camera so that they rotate with it and then add a bit of code that makes the player character’s body rotate after a certain threshold (so your arms and head don’t do a 360)

I don’t know why the first video up there isn’t working with this either. I assume what i’m going for is very specific or just hardly done outside of the studio system? I cant find anything that helps with this.

I want to give the player a full body, not separated arms and heads (so online will be 1:1 and VR can potentially come into it)

I COULD go the route of just having floating arms but for me that’s not good enough in this circumstance and with all this new tech on the horizon i’d like to get away from that as early as possible.

So after this probably far too long explanation (sorry about that and thanks if you got this far)…

My question is how do I get aim offset working in an FPS. or how do I make the head, gun and upper arm bones rotate with the camera to just flat out brute force it, either will do.

Has anyone ever gotten this working in UE4 and would be willing to share?

Thank you for your time,

-Jack

Im having this same problem, it follows correctly the pitch to roll in the initial rotation, but it inverts it when the player rotate 180 in yaw.

I have pretty much the same problem here, the aimoffset isn’t working properly for me, and replication problems.
I guess it’s the true fps problem…
If someone could help it would be really nice !

  1. Get actor transform and aim base rotation.
  2. Convert the aim rotation to vector.
  3. using the actor transform invert transform direction the aim vector.
  4. Make rotator from x vector using the output of step 3.

Now your aim will be relative to the actor transform.