How to change the weapon's recoil? (first person arm's recoil not the aim or camera recoil)

TrungDong

Member
I'm creating a weapon that has zero recoils (it does not shake when fires).
In the shootable weapon, there is a recoil setting part, but this part can only change the camera's recoil, not the weapon model.
Even if I set all the parameters to zero, the weapon recoil was still there, only the camera became static.
Then I realized the cause of the weapon recoil was FirstPersonObjectPivot. Each time the player fire, that pivot's transform shook!
How to change that recoil? It's weird that the camera and the aim did not shake at all but the weapon shook like crazy.
 
Look in the item's ShootableWeapon component, under the Recoil section. The Position Recoil values should be what you're looking for.

1591703155843.png
 
Look in the item's ShootableWeapon component, under the Recoil section. The Position Recoil values should be what you're looking for.

View attachment 3163

Like I have said,

In the shootable weapon, there is a recoil setting part, but this part can only change the camera's recoil, not the weapon model.
Even if I set all the parameters to zero, the weapon recoil was still there, only the camera became static.

It did not work.
 
I'm unable to reproduce your issue within the demo scene. Can you reproduce this in the demo? Also please compare your setup with the demo setup. (E.g. camera controller, character rig.) Which version of UCC are you using?

(You could simply manually override the rig's position/rotation adjustments with a couple of lines in a custom script, but that shouldn't be needed. Adjusting the position recoil values works just fine in the demo scene.)
 
I'm unable to reproduce your issue within the demo scene. Can you reproduce this in the demo? Also please compare your setup with the demo setup. (E.g. camera controller, character rig.) Which version of UCC are you using?

Yes, you are right. The demo setup does not have this problem. That's strange because I have followed the tutorial video to create my new weapon, that's all. I'm going to read the code to find the cause.
 
I haven't used specifically, but i believe the hand recoils are controlled by the springs in the CharacterIK component. I suspect Nolan controls these via states in the demo scene (or at least has a suitable default setting)? I would guess the shootable weapon script dictates this, so adjusting that script would also affect it.
 
I have found the cause! Because I was too lazy, I used UCC's Assault Rifle animations for my new weapon. But Assault Rifle fire animation itself has recoil, so even I removed all recoil, pivot, etc parts in the setting, the weapon still has recoil when it shoots.
 
Top