fix(moveplayer3D): use ground speed instead of xsp for animations
This commit is contained in:
parent
cf04a16c84
commit
ddebdba2e8
1 changed files with 2 additions and 1 deletions
|
@ -36,7 +36,8 @@ function Player:updateEnd(dt)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Player:setAnimation()
|
function Player:setAnimation()
|
||||||
self:setCustomSpeed(math.abs(self.xsp) / 12)
|
local gsp = utils.math.pointDistance(0, 0, self.xsp, self.ysp)
|
||||||
|
self:setCustomSpeed(math.abs(gsp) / 12)
|
||||||
if (self.isPunching) then
|
if (self.isPunching) then
|
||||||
self:changeAnimation("punch", false)
|
self:changeAnimation("punch", false)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue