Fixed child IK bone not being updated when IK mix = 0.

This commit is contained in:
NathanSweet 2016-06-05 01:44:35 +02:00
parent 7729d423f7
commit b3fdaca019

View File

@ -143,7 +143,10 @@ public class IkConstraint implements Updatable {
* target is specified in the world coordinate system. * target is specified in the world coordinate system.
* @param child A direct descendant of the parent bone. */ * @param child A direct descendant of the parent bone. */
static public void apply (Bone parent, Bone child, float targetX, float targetY, int bendDir, float alpha) { static public void apply (Bone parent, Bone child, float targetX, float targetY, int bendDir, float alpha) {
if (alpha == 0) return; if (alpha == 0) {
child.updateWorldTransform();
return;
}
float px = parent.x, py = parent.y, psx = parent.scaleX, psy = parent.scaleY, csx = child.scaleX; float px = parent.x, py = parent.y, psx = parent.scaleX, psy = parent.scaleY, csx = child.scaleX;
int os1, os2, s2; int os1, os2, s2;
if (psx < 0) { if (psx < 0) {