Browse Source

[lua] Fix transform constraint parsing. Closes #1647.

badlogic 5 years ago
parent
commit
1e5aaeaa8b
1 changed files with 2 additions and 0 deletions
  1. 2 0
      spine-lua/SkeletonJson.lua

+ 2 - 0
spine-lua/SkeletonJson.lua

@@ -202,6 +202,8 @@ function SkeletonJson.new (attachmentLoader)
 				data.target = skeletonData:findBone(targetName)
 				data.target = skeletonData:findBone(targetName)
 				if not data.target then error("Transform constraint target bone not found: " .. (targetName or "none"), 2) end
 				if not data.target then error("Transform constraint target bone not found: " .. (targetName or "none"), 2) end
 
 
+				data.local_ = getValue(constraintMap, "local", false)
+				data.relative = getValue(constraintMap, "relative", false)
 				data.offsetRotation = getValue(constraintMap, "rotation", 0);
 				data.offsetRotation = getValue(constraintMap, "rotation", 0);
 				data.offsetX = getValue(constraintMap, "x", 0) * scale;
 				data.offsetX = getValue(constraintMap, "x", 0) * scale;
 				data.offsetY = getValue(constraintMap, "y", 0) * scale;
 				data.offsetY = getValue(constraintMap, "y", 0) * scale;