From 457447b025c079089c65409e8107b6c2b8e5e1c5 Mon Sep 17 00:00:00 2001 From: badlogic Date: Fri, 17 May 2019 11:35:52 +0200 Subject: [PATCH] [lua] Fixed parsing of IK constraint bend direction. Closes #1357. --- spine-lua/SkeletonJson.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spine-lua/SkeletonJson.lua b/spine-lua/SkeletonJson.lua index c5c9fcac6..abb4e25b8 100644 --- a/spine-lua/SkeletonJson.lua +++ b/spine-lua/SkeletonJson.lua @@ -164,7 +164,11 @@ function SkeletonJson.new (attachmentLoader) if not data.target then error("Target bone not found: " .. targetName) end data.mix = getValue(constraintMap, "mix", 1) - if constraintMap["bendPositive"] == nil or constraintMap["bendPositive"] == false then data.bendDirection = -1 else data.bendDirection = 1 end + if constraintMap["bendPositive"] == nil or constraintMap["bendPositive"] == true then + data.bendDirection = 1 + else + data.bendDirection = -1 + end if constraintMap["compress"] == nil or constraintMap["compress"] == false then data.compress = false else data.compress = true end if constraintMap["stretch"] == nil or constraintMap["stretch"] == false then data.stretch = false else data.stretch = true end if constraintMap["uniform"] == nil or constraintMap["uniform"] == false then data.uniform = false else data.uniform = true end