How to make a deadzone aim (Free aim)

How to make a deadzone aim (Free aim). Like the unrecord game.

Like this video: BODYCAM FPSKIT V2 (Showcase) (make your own UNRECORD) - YouTube Second 0:12

Aim Offset

Hello, I made the aim offsets, but when I turn left and right, the camera rotates. There is no problem when looking up and down, but when I turn right and left, the character does not turn, only rotate camera turns.



if you don’t understand the problem, I can shoot it on video

Are you using the 1st or 3rd person BP project for your character?

1st person project

first person template

Is the aim offset anim playing properly as you turn left and right, with the char just not turning as you exceed the min/max offsets?

no

What does the code look like which is setting the aim offset’s yaw value?

1 Like



Ekran görüntüsü 2023-10-31 174226

@illspiritx @Rev0verDrive

Can’t make out what the yaw pin is doing in the screen, but if it’s simply getting the aim yaw, it wouldn’t really be able to tell the anim what the offset should be. To do so, you’d need to get the delta rotation between the pawn’s current rotation and the aim. Raw pitch works because it’s always relative to horizontal. Since yaw is an arbitrary value between ±180 degrees, the offset needs to know where the “center” is.

For example, I call this function in tick on my characters:

Anim bp feeds aim yaw and aim pitch vars into the aim offset player.

The select and addition nodes after the delta rot there are just hacky tweaks to fix my sloppy anims, so you can ignore them (or tweak if needed).

For the yaw offset to work, you also need to stop the character from using the control rotation when the offset is less than its max value.

I do this by simply setting UseControllerDesiredRotation on character movement component to true when the offset is greater than 85, and turning it back off when it’s near 0.

1 Like

thx @illspiritx

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.