Вот луа код мода на кортекс комманд, который отвечает за анимацию оружия:

function Create(self)
	------------------------------------------------------------------
	----------------------- Sound Stuff ------------------------------

	self.soundBoltForward = CreateSoundContainer("RP-46 Bolt Forward", "bf.rte")
	
	self.soundTable = { self.soundBoltForward }

	------------------------------------------------------------------
	------------------------ Bolt anim -------------------------------
	------------------------------------------------------------------

	self.origJointOffset = self.JointOffset --self.JointOffset--Vector(-12, 4)
	self.origSupportOffset = self.SupportOffset --self.SupportOffset --Vector(1,4)
	self.origStanceOffset = self.StanceOffset --self.StanceOffset - vector(0,2)

	self.animType = {}

	local i


	------------------------------------------------------------------
	----------------------- Cycle Anim -------------------------------

	local cycleStage
	i = 0

	cycleStage = {}

	---------- Pull back a bit-------------------
	i = i + 1
	cycleStage[i] = {}
	cycleStage[i].jointOffset = self.origJointOffset
	cycleStage[i].supportOffset = self.origSupportOffset
	cycleStage[i].stanceOffset = self.origStanceOffset

	cycleStage[i].rifleFrame = 1

	cycleStage[i].angle = 0
	cycleStage[i].angleSpeed = 4

	cycleStage[i].duration = 20

	---------- Pull back full-------------------
	i = i + 1
	cycleStage[i] = {}
	cycleStage[i].jointOffset = self.origJointOffset
	cycleStage[i].supportOffset = self.origSupportOffset
	cycleStage[i].stanceOffset = self.origStanceOffset

	cycleStage[i].rifleFrame = 2

	cycleStage[i].angle = 0
	cycleStage[i].angleSpeed = 4

	--cycleStage[i].canEject = true

	cycleStage[i].duration = 65

	---------- Pull fowards a bit-------------------
	i = i + 1
	cycleStage[i] = {}
	cycleStage[i].jointOffset = self.origJointOffset
	cycleStage[i].supportOffset = self.origSupportOffset
	cycleStage[i].stanceOffset = self.origStanceOffset

	cycleStage[i].rifleFrame = 1

	cycleStage[i].angle = 0
	cycleStage[i].angleSpeed = 6

	cycleStage[i].duration = 30

	---------- Pull fowards full-------------------
	i = i + 1
	cycleStage[i] = {}
	cycleStage[i].jointOffset = self.origJointOffset
	cycleStage[i].supportOffset = self.origSupportOffset
	cycleStage[i].stanceOffset = self.origStanceOffset

	cycleStage[i].rifleFrame = 0

	cycleStage[i].angle = 0
	cycleStage[i].angleSpeed = 4

	cycleStage[i].duration = 30

	self.animType[1] = cycleStage

	------------------------------------------------------------------
	----------------------- Reload Start Last casing -------------------------------

	local reloadStartLast
	i = 0

	reloadStartLast = {}

	---------- Pull back a bit-------------------
	i = i + 1
	reloadStartLast[i] = {}
	reloadStartLast[i].jointOffset = self.origJointOffset
	reloadStartLast[i].supportOffset = self.origSupportOffset
	reloadStartLast[i].stanceOffset = self.origStanceOffset

	reloadStartLast[i].rifleFrame = 1

	reloadStartLast[i].angle = 0
	reloadStartLast[i].angleSpeed = 4

	reloadStartLast[i].duration = 20

	---------- Pull back full-------------------
	i = i + 1
	reloadStartLast[i] = {}
	reloadStartLast[i].jointOffset = self.origJointOffset
	reloadStartLast[i].supportOffset = self.origSupportOffset
	reloadStartLast[i].stanceOffset = self.origStanceOffset

	reloadStartLast[i].rifleFrame = 2

	reloadStartLast[i].angle = 0.2
	reloadStartLast[i].angleSpeed = 2

	--reloadStartLast[i].canEject = true

	reloadStartLast[i].duration = 35

	self.animType[2] = reloadStartLast

	------------------------------------------------------------------
	----------------------- Reload End Last Casing -------------------------------

	local reloadEndLast
	i = 0

	reloadEndLast = {}

	-------------- Wait a sec ------------------------------
	i = i + 1
	reloadEndLast[i] = {}
	reloadEndLast[i].jointOffset = self.origJointOffset
	reloadEndLast[i].supportOffset = self.origSupportOffset
	reloadEndLast[i].stanceOffset = self.origStanceOffset

	reloadEndLast[i].rifleFrame = 2

	reloadEndLast[i].angle = 0.2
	reloadEndLast[i].angleSpeed = 0

	reloadEndLast[i].duration = 120

	---------- Grab bolt 1-------------------
	i = i + 1
	reloadEndLast[i] = {}
	reloadEndLast[i].jointOffset = Vector(-9, 2)
	reloadEndLast[i].supportOffset = self.origSupportOffset
	reloadEndLast[i].stanceOffset = Vector(5, 4)

	reloadEndLast[i].rifleFrame = 2

	reloadEndLast[i].angle = 0.2
	reloadEndLast[i].angleSpeed = 0

	reloadEndLast[i].duration = 100

	---------- Grab bolt full -------------------
	i = i + 1
	reloadEndLast[i] = {}
	reloadEndLast[i].jointOffset = Vector(-7, 0)
	reloadEndLast[i].supportOffset = self.origSupportOffset
	reloadEndLast[i].stanceOffset = Vector(6, 3)

	reloadEndLast[i].rifleFrame = 2

	reloadEndLast[i].angle = 0.2
	reloadEndLast[i].angleSpeed = 0

	reloadEndLast[i].duration = 100

	---------- Pull fowards a bit-------------------
	i = i + 1
	reloadEndLast[i] = {}
	reloadEndLast[i].jointOffset = Vector(-6, 0)
	reloadEndLast[i].supportOffset = self.origSupportOffset
	reloadEndLast[i].stanceOffset = Vector(6, 3)

	reloadEndLast[i].rifleFrame = 1

	reloadEndLast[i].angle = 0.2
	reloadEndLast[i].angleSpeed = 0

	reloadEndLast[i].playSound = self.soundTable[1]

	reloadEndLast[i].duration = 75

	---------- Pull fowards full-------------------
	i = i + 1
	reloadEndLast[i] = {}
	reloadEndLast[i].jointOffset = Vector(-4, 0)
	reloadEndLast[i].supportOffset = self.origSupportOffset
	reloadEndLast[i].stanceOffset = Vector(6, 3)

	reloadEndLast[i].rifleFrame = 0

	reloadEndLast[i].angle = 0.2
	reloadEndLast[i].angleSpeed = 0

	reloadEndLast[i].duration = 90

	---------- Return to normal-------------------
	i = i + 1
	reloadEndLast[i] = {}
	reloadEndLast[i].jointOffset = Vector(-7, 2)
	reloadEndLast[i].supportOffset = self.origSupportOffset
	reloadEndLast[i].stanceOffset = Vector(5, 3)

	reloadEndLast[i].rifleFrame = 0

	reloadEndLast[i].angle = 0.15
	reloadEndLast[i].angleSpeed = 2

	reloadEndLast[i].duration = 60

	i = i + 1
	reloadEndLast[i] = {}
	reloadEndLast[i].jointOffset = self.origJointOffset
	reloadEndLast[i].supportOffset = self.origSupportOffset
	reloadEndLast[i].stanceOffset = self.origStanceOffset

	reloadEndLast[i].rifleFrame = 0

	reloadEndLast[i].angle = 0
	reloadEndLast[i].angleSpeed = 2

	reloadEndLast[i].duration = 30

	self.animType[3] = reloadEndLast

	------------------------------------------------------------------
	----------------------- Reload Start Normal -------------------------------

	local reloadStartNormal
	i = 0

	reloadStartNormal = {}

	---------- Pull back a bit-------------------
	i = i + 1
	reloadStartNormal[i] = {}
	reloadStartNormal[i].jointOffset = self.origJointOffset
	reloadStartNormal[i].supportOffset = self.origSupportOffset
	reloadStartNormal[i].stanceOffset = self.origStanceOffset

	reloadStartNormal[i].rifleFrame = 0

	reloadStartNormal[i].angle = 0.2
	reloadStartNormal[i].angleSpeed = 2

	reloadStartNormal[i].duration = 200

	self.animType[4] = reloadStartNormal

	------------------------------------------------------------------
	----------------------- Reload End Normal -------------------------------

	local reloadEndNormal
	i = 0

	reloadEndNormal = {}

	---------- Pull back a bit-------------------
	i = i + 1
	reloadEndNormal[i] = {}
	reloadEndNormal[i].jointOffset = self.origJointOffset
	reloadEndNormal[i].supportOffset = self.origSupportOffset
	reloadEndNormal[i].stanceOffset = self.origStanceOffset

	reloadEndNormal[i].rifleFrame = 0

	reloadEndNormal[i].angle = 0
	reloadEndNormal[i].angleSpeed = 2

	reloadEndNormal[i].duration = 200

	self.animType[5] = reloadEndNormal

	----------------------------------------------------------------

	self.parent = nil

	self.origAnimRateOfFire = self.RateOfFire

	self.boltAnimation = false
	self.disableFiring = false
	self.playSound = false
	self.spawnStrip = false

	self.whatStage = 0
	self.whatAnimType = 0

	self.boltAnimTimer = Timer()
	self.boltAnimSet = false

	self.stagePos = Vector()

	self.origAngleNum = 0
	self.modifiedAngle = 0
	self.modifiedSpeed = 0
end

function Update(self)
	if self:IsAttached() == true then --I think this is more performance friendly as it doesn't check the parent every frame, rather just when the gun is first taken.
		if self.parent == nil then
			if IsAHuman(self:GetRootParent()) then
				self.parent = ToAHuman(self:GetRootParent())
			end
		end
	else
		self.parent = nil
	end

	if self.boltAnimation == false then
		if self.FiredFrame and self.Magazine and self.Magazine.RoundCount > 0 then
			self.boltAnimation = true
			self.playSound = true
			--self.spawnCasing = true
			self.spawnStrip = true
			--self.disableCasing = false
			self.disableFiring = false

			self.boltAnimTimer:Reset()

			self.whatStage = 1
			self.whatAnimType = 1
		elseif self:NumberValueExists("Reload Animation") and self:GetNumberValue("Reload Animation") > 0 then
			if self:GetNumberValue("Reload Animation") == 1 then
				self.boltAnimation = true
				self.playSound = true
				--self.spawnCasing = true
				self.spawnStrip = true
				--self.disableCasing = false
				self.disableFiring = true

				self.boltAnimTimer:Reset()

				self.whatStage = 1
				self.whatAnimType = 2
			elseif self:GetNumberValue("Reload Animation") == 2 then
				self.boltAnimation = true
				self.playSound = true
				--self.spawnCasing = true
				self.spawnStrip = true
				--self.disableCasing = false
				self.disableFiring = true

				self.boltAnimTimer:Reset()

				self.whatStage = 1
				self.whatAnimType = 3
			elseif self:GetNumberValue("Reload Animation") == 3 then
				self.boltAnimation = true
				self.playSound = true
				--self.spawnCasing = true
				self.spawnStrip = true
				--self.disableCasing = false
				self.disableFiring = true

				self.boltAnimTimer:Reset()

				self.whatStage = 1
				self.whatAnimType = 4
			elseif self:GetNumberValue("Reload Animation") == 4 then	
				self.boltAnimation = true
				self.playSound = true
				self.spawnStrip = true
				self.disableFiring = true

				self.boltAnimTimer:Reset()

				self.whatStage = 1
				self.whatAnimType = 5
			end
			self:SetNumberValue("Reload Animation", 0)
		end
	end

	if self.parent then
		if self.boltAnimation == true then
			if self.disableFiring == true then
				self.parent:GetController():SetState(Controller.AIM_SHARP, false)
				self:Deactivate()
			end

			local animStages = self.animType[self.whatAnimType]
			local currentStage = animStages[self.whatStage] --Get current stage of attack, then apply values below

			self.Frame = currentStage.rifleFrame

			self.stagePos = currentStage.jointOffset - self.origJointOffset

			self.StanceOffset = currentStage.stanceOffset + self.stagePos
			self.JointOffset = currentStage.jointOffset
			self.SupportOffset = currentStage.supportOffset

			self.modifiedAngle = currentStage.angle
			self.modifiedSpeed = currentStage.angleSpeed

			if currentStage.playSound ~= nil and self.playSound == true then
				currentStage.playSound:Play(self.Pos)
				self.playSound = false
			end

			local animMultiplier = (self.origAnimRateOfFire / self.RateOfFire)

			if self.boltAnimTimer:IsPastSimMS(currentStage.duration * animMultiplier) then --end of stage, jump to next
				self.origAngleNum = self.angleNum
				self.boltAnimTimer:Reset()
				self.boltAnimation = true
				--self.spawnCasing = true
				self.spawnStrip = true
				self.playSound = true

				if self.whatStage < #animStages then
					self.whatStage = self.whatStage + 1
				else
					self.boltAnimation = false
				end
			end
		end

		if self.origAngleNum > self.modifiedAngle then
			if self.angleNum > self.modifiedAngle then
				self.angleNum = self.angleNum - 1 * 0.01 * self.modifiedSpeed
			else
				self.angleNum = self.modifiedAngle
			end
		elseif self.origAngleNum < self.modifiedAngle then
			if self.angleNum < self.modifiedAngle then
				self.angleNum = self.angleNum + 1 * 0.01 * self.modifiedSpeed
			else
				self.angleNum = self.modifiedAngle
			end
		else
			self.angleNum = self.modifiedAngle
		end

		self.InheritedRotAngleOffset = self.angleNum
	else
		self.boltAnimTimer:Reset()
	end
end
Но проблема в том что когда происходит анимация передёргивания затвора, рука персонажа смещается вверх по оси игрек (self.JointOffset) и там и остаётся. Как же это исправить?