[lua] Port of commit ccc5b2f: Fixed root bone transform for skeleton. See #1379.

This commit is contained in:
badlogic 2019-06-13 16:05:56 +02:00
parent b500055baf
commit 6e54e8d819

View File

@ -105,8 +105,8 @@ function Bone:updateWorldTransformWith (x, y, rotation, scaleX, scaleY, shearX,
local rotationYRad = math_rad(rotationY)
local skeleton = self.skeleton
self.a = math_cos(rotationRad) * scaleX * sx
self.b = math_cos(rotationYRad) * scaleY * sy
self.c = math_sin(rotationRad) * scaleX * sx
self.b = math_cos(rotationYRad) * scaleY * sx
self.c = math_sin(rotationRad) * scaleX * sy
self.d = math_sin(rotationYRad) * scaleY * sy
self.worldX = x * sx + skeleton.x
self.worldY = y * sy + skeleton.y