• Editor
  • Aiming + Firing

  • Đã chỉnh sửa
Related Discussions
...

Hi Esoteric Team,

I am currently working on recoil and my character has the ability to aim his weapon in a wide arc around his body. I have been using a Transform Constraint on the hand holding the firearm to relocate itself to the constraint after the weapon has been fired, but sadly this is not enough to make the animation look amazing. I need the players back and head to react to the shot as well, problem is these body parts are already being calculated during the blending of 3 aiming tracks. I wish I could simply add a rotational value to the gun and move the hand holding the firearm back to the firing constraint while also rotating the back bones, all additively to the aiming animations seamlessly.

I am unsure of how to proceed.

Tim


Is it possible in code to grab the players wrist, rotate it a set amount. Grab the players spine and rotate it a set amount, and determine the direction the weapon is facing and translate it backwards a set amount. All of these changes would need to be done additively and not done by overriding as the location of the aiming condition would need to remain constant, except for the recoil duration.


Just searched and found this Runtime Skeletons - Spine Runtimes Guide. Shows pretty nicely how it would be done, but I want your thoughts, is this the best and most efficient way to produce a full body recoil effect. I am talking about the back bending slightly, hands rotating slightly, gun translating backwards. LMK,

Best,
Tim

You could adjust the bones using code at runtime, as described in the procedural animation section of the runtimes guide you linked. However, it can be difficult to write code to animate. I would probably use an animation to do it. You can apply an animation additively by setting TrackEntry mixBlend to MixBlend add. You can preview an additive animation in the editor using Preview. There won't be any issues with applying animations on many other tracks, just apply your additive track on top of everything else.

The important thing about applying additively is that all properties keyed by the additive animation must be either set in lower tracks or set in code. Otherwise the value will be added to every frame, resulting in values that quickly get very large.