Merge pull request #1014 from vlidholt/master
Fixes issue in sprite constraint
This commit is contained in:
commit
b20bbd4818
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user