Aimoffset Shooting issue

Right now I can shoot bullets anywhere I aim, which exceeds the limit off my aimoffset. So I would like to have either my camera being linked to the maximum angles of the aimoffset, or have the camera still be able to look everywhere, but have to gun not fire any bullets when it is aiming beyond the aimoffset. You can see the issue in this Video. Maybe this is quite simple, but I couldn;t find a solution and I am not that experienced with UE4 yet. i hope you guys and gals can help :slight_smile:

Limit camera rotation to around 80 degrees left/right. When the rotation does hit 80 rotate the character.

Could you give me an example of how you would code this? I tried messing around with this idea, but cannot seem to get the code working (I am still quite a bit of a beginner imo.)

This looks exactly like the thing I was looking for. Thank you so much :smiley:

There’s another one from epic games that goes into more detail. If memory serves it was a live training stream with the top 2 anim devs from fortnite. Dig a little and you should be able to find it.

Root Bone offsets, turn in place etc etc.

Here’s a solid tutorial. It’s a lot of work, but worth it.

I checked it out, but since my aimoffset works in a different way, I tried something else. I eventually figured out a solution myself. I managed to get the value of my Aim Yaw float in the anim blueprint (which controls my aimoffset) to my characterblueprint. I then put this in my shooting code with a branch and hooked it up in the delayed loop of the firerate. It now stops shooting when I aim beyond the aimoffset, and starts shooting when I aim back whilst holding the button at all times (because oif automatic fire.) It’s not perfect, but I think it;s ok for now. Thanks for your help anyway. I might use that tutorial in a future project :slight_smile: