Merge pull request #1014 from vlidholt/master

Fixes issue in sprite constraint
This commit is contained in:
Viktor Lidholt 2015-09-02 10:58:35 -07:00
commit b20bbd4818

View File

@ -53,6 +53,11 @@ class ConstraintRotationToNode extends Constraint {
void constrain(Node node, double dt) {
Offset offset;
if (targetNode.spriteBox != node.spriteBox) {
// The target node is in another sprite box or has been removed
return;
}
if (targetNode.parent == node.parent) {
offset = targetNode.position - node.position;
} else {