Shooter Gun System

Is there a tutorial video?

Yes, there is: - YouTube

Thank you!

Thank You!

Hi @PEACESELLS9631 I would like to add an unarmed state. So I can toggle between armed and unarmed. How should I go bout it?

I have created a new blendspace with the anims I want, and have made a state machine in the abp. I also created an enum to switch between states in the character bp but it is not responding when i play however it works in the anim bp preview.

Hey! Regarding the addition of an unarmed option, I wouldn’t add it as a new state in the armed state machine, I would add a separate unarmed state machine, this would make things easier, IMO.

Regarding the anim BP preview window, it takes into consideration the default values for the vars, while in-game these values will change in real-time. Unreal’s anim BP has a panel called ‘Anim Preview Editor’ (usually located on the lower right corner), which lets you change the values of each var in real-time for testing in the preview window without changing the default values, which is useful.

Updated to v1.5.5

Change log:

  • Changed the amount of virtual bones on the character from 3 to 2 (removed the VB sight bone). This fixes an issue that some custom skeletons/anims had with the system. Also updated the related section of the instructions video

  • The function CalcSightsTransforms was changed and now it’s named CalcHandTransforms

  • For iron sights, now the center of mouse sway on the gun can be easily changed from the front sight to the rear sight in the blueprints, if preferred

  • Fixed log errors that would sometimes appear when trying to shoot, aim, etc. before the character was completely spawned in multiplayer

Hi, just purchased the asset, so maybe I’m doing something wrong, but Pressing “V” does not seem to change sights. I have added extra sight to barrel.

Hello and thank you!

Where did you add it? If it’s out of the angle limit, the code will prevent you from using it. Press Y to adjust the angle limit. If you want to use a sight in an horizontal angle, for example, the angle limit must be more than 90 degrees.

Here, I made a video of the issue i’m having, maybe it’s clearer. ShooterGunSystem Test - YouTube

1 Like

Oh yes, I see what you mean now, thank you for making the video!

Just place a rear sight to go with this front sight and it will work (the front sight alone won’t work without the rear sight):

For that location, you’ll need a canted rail for the rear sight too. You’ll need to make room by removing both the rear sight and the optic that are initially there . After placing the rear sight, you can place the optic back.

Regarding you not seeing the other player in multiplayer, check this setting before you hit play and make sure you are not choosing “Play Standalone”:

1 Like

Awesome thanks, solved both of my issues.

1 Like

Updated to v1.5.5b

Change log:

  • Turned off nativization in the project settings, as it can give errors in packaged projects

Hi, not sure if this has been asked before, but is there a good/recommended way of handling left hand positioning? Either when adding a vertical grip attachment or switching weapons? I have a somewhat working solution but it causes the left hand to lag behind and stutter a bit, which is quite obvious.

Child Gun Part Vertical Grip blueprint function to return a named socked for left hand transform:

Updating left hand bone in AnimBP to socket location:

AnimBP UpdateGraph sets the transform from the gun part component for left hand grip:

Updating settings for various Child Gun Parts in ModifyGunProperties function:

I’m trying to avoid the huge ordeal of having separate animations for each rifle type if possible and solve it with a few localized blended anims for hand grip, or hand placement, if possible. But in an efficient way. So if you have any thoughts or ideas on how to fix the lag for the left hand position, I would appreciate it. :slight_smile:


Figured out the lag issue, I had to transform from world space to bone space the location of the grip socket…

Hi PeaceSells

I transplanted ‘shooter gun system’ into my character.

However, the coordinate axis is Maya, and the location is strange.

Please advise on how to fix this

It looks like you are using a second IK node (FABRIK) after the IK included in the project. I would instead just move the bone VB hand_l (which is the effector target for IK already included) to the grip location/rotation before the IK already included is executed (in other words, before the TwoBoneIK nodes in the anim graph):

In this pic I’m typing the location and rotation values manually, but you could use a var (like you’re using) to input that. You can experiment with changing the settings on the right - ‘AddToExisting’, ‘BoneSpace’ - but if you’re using a var, like your transform that comes from a socket, you have to make sure the space used is compatible, as well as if you’re adding to the existing bone transform or replacing it.

Also, if your’e using bone space, you probably don’t need to grab the socket’s transform every frame, since it’s position in relation to the hand probably doesn’t change over time when you’re holding the gun.

Another important thing is that you’ll probably have to turn off that node in my pic when you play a reload anim, for example, because, since the node moves the hand away form its original position in the original animation, it won’t grab the mag at the right place and will look wrong. Just make sure you set the ‘Alpha’ of this node to 0 when playing the reload. It’s nice to also use the built-in interp option inside this node. for smooth transitions between on and off:

1 Like

Hey, I can see in your pic that your Aimpoint_Front_1 socket has the Z axis pointing to the side. Rotate the socket so that the Z axis points up, while the X axis keeps pointing forward. All aimpoint sockets must have the Z axis up and the X axis forward.

It looks like there’s already a bone there at the front sight (which I guess came from Maya), but that’s not a problem, just rotate the socket inside Unreal.

Also rotate your FP_Camera socket in your character’s head, so that the Z axis points up while the X axis points forward

Thanks, I’ll look into this, good idea.

Hi. I would like to ask if what parameters are available for the projectiles? Will it include gravity, wind and penetration parameters in the future aside from the velocity?

I also asked in the MP about having different FOVs for aiming and non-aiming. Thank you

Hello, gravity is already a parameter. Wind and penetration aren’t in the plans…

Regarding the FOV, this is the answer I posted to your question in the product page: to change FOV, you call ‘SeFieldOfView’ on the camera and type in the value you want. Do that in the EnterAiming event and in the ExitAiming event you call it again and type in the default FOV for not aiming (90 degrees in our case).

Thank you!

1 Like

Hi. I have to commend again this system. I successfully transferred the recoil recovery logic to mym own character which blends FPP arm animations to a thirdperson mesh so that I only need 1 set of animations for arm-weapon and the rest are for the locomotion for the full body shadows and lower leg. I tried other recoil system/tuts before but this system really nailed it, especially the recoil recovery, and it is quite intuitive how you did that.

I am trying to get the logic out of how your weapon sway and aim offset. Looking briefly at the BPs it seems it is driven by IKs also? I am not sure if the logic I need to get is the one from the AB_democharacter AnimGraph. My current system uses transform bone and two bone IK with certain bones on the hand and the left hand is attached to a socket on the weapon. But I currently have problems when strafing as the wrist doesn’t partially rotate to the left or right. I want to adopt your system as it is more polished. Thanks

I think I found it, the update graph>directional sway?