mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-19 08:16:41 +08:00
Fixed spine-lua IK timelines.
This commit is contained in:
parent
97bc171bdd
commit
66dee75951
@ -691,7 +691,7 @@ function Animation.IkConstraintTimeline.new ()
|
||||
local frames = self.frames
|
||||
if time < frames[0] then return end -- Time is before first frame.
|
||||
|
||||
local ikConstraint = skeleton.ikConstraints[ikConstraintIndex]
|
||||
local ikConstraint = skeleton.ikConstraints[self.ikConstraintIndex]
|
||||
|
||||
if time >= frames[#frames - 2] then -- Time is after last frame.
|
||||
ikConstraint.mix = ikConstraint.mix + (frames[#frames - 1] - ikConstraint.mix) * alpha
|
||||
|
||||
@ -440,8 +440,8 @@ function SkeletonJson.new (attachmentLoader)
|
||||
local ik = map["ik"]
|
||||
if ik then
|
||||
for ikConstraintName,values in pairs(ik) do
|
||||
local ikConstraint = skeletonData.findIkConstraint(ikConstraintName)
|
||||
local timeline = IkConstraintTimeline.new()
|
||||
local ikConstraint = skeletonData:findIkConstraint(ikConstraintName)
|
||||
local timeline = Animation.IkConstraintTimeline.new()
|
||||
for i,other in pairs(skeletonData.ikConstraints) do
|
||||
if other == ikConstraint then
|
||||
timeline.ikConstraintIndex = i
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user