When using Gunman Asset Pack aiming is done by rotating an IK called AimPivot. In Spine 3.6 this worked. In 3.7, it no longer works at all.
I will show pictures and explain as clearly as possible.
This is how it works in 3.6. The entire body is rotated with the AimPivot
In 3.7 nothing rotates except the weapon itself. The arms stay fixed.
The issue lies in Animation.lua or the AnimationState.lua files as if I revert those two alone the issue is resolved.
Each tick of the game this occurs
local currentTime = system.getTimer() / 1000
local delta = currentTime - lastTime
lastTime = currentTime
animationState:update(delta)
animationState:apply(skeleton)
skeleton:updateWorldTransform()
aiming the weapon simply does this
obj.aim = function(val)
if (aimPivotBone == nil) then
aimPivotBone = skeleton:findBone("AimPivot")
end
aimPivotBone.rotation = val
end
and equipping a weapon
animationState:setAnimationByName(1, "weapon.setupAnim", false)
animationState:setAnimationByName(2, "weapon.idleAnim", true, 0)