How to make pump animation for a gun?

I have a gun that neeed a pump animation , i just want to do it by code. i have no experience with animation blueprint, and i also checked the API, there is no functions like ‘SetBoneTransform’ .any ideas?

Hi Jone,

first of all you need to make sure that this is a SkeletalMesh and that it is properly rigged. Then you can create a AnimBlueprint and inside of the anim graph you can use “Transform (Modify) Bone” to move the bone.
If you want to do it this way please keep in mind that you also need to interpolate manually to have a smooth movement of the bone.
If you want to be able to trigger this behavior from code you could create a new base class for your anim blueprint and expose state variables to control the behavior of the animation.

Hope this gives you a starting point,