The weapon reloading system has a bug in this lesson. The character cannot draw the gun correctly. Only after changing the magazine can the gun be drawn normally.

UE4 series article directory

foreword

The bug that appeared in the lesson of learning the weapon reloading system, the character cannot draw the gun correctly, and the gun can only be drawn normally after changing the magazine. It is only after the reloading is added that the gun holding function is affected. After the reloading Holding a gun has become normal again. The following uses the picture to show the error conditioninsert image description here

1. Implementation of the blueprint

insert image description here

insert image description here

Two, the cause of the error

1. First of all, three questions. The first question is whether the animation blueprint can be reloaded. You have ticked the default value of all boolean values. The default value of all boolean values ​​is not ticked. Otherwise, if you ticked at the beginning Tick ​​it, then it will enter the state of reloading from the very beginning, and it will not come out.

2. The second question is the movement of the camera after you equip the weapon. It is reasonable that after we equip the weapon, our camera will move a little to the left. Then it is because you cannot achieve it, and it is because of your time. There are two keyframes in the axis, the first one is fine, the value of the second keyframe is not 1, but 0.15, which makes it impossible for him to move to its spring wall and the position of 50.

3. The third question is the error, the warning, the yellow warning, every time you run the game, why? Because the clips in your weapon attachments do not connect the clips to the node that attaches Ai, if the target is empty, you will be prompted that there is a problem, so there are some negligence in details.

3. The modified effect

insert image description here
If the default value of the bomb change variable is true,
insert image description here
insert image description here
so the default value of the bomb change variable here should be unchecked

Guess you like

Origin blog.csdn.net/aoxuestudy/article/details/132217069