Apply parent inverse when adding child

This commit is contained in:
Lubos Lenco 2017-11-01 02:51:48 +01:00
parent f123a7b1eb
commit 932b3827d5

View file

@ -4,6 +4,8 @@ import armory.object.Object;
class SetParentNode extends LogicNode {
static inline var parentInverse = true;
public function new(tree:LogicTree) {
super(tree);
}
@ -16,7 +18,7 @@ class SetParentNode extends LogicNode {
if (parent == null) parent = tree.object;
object.parent.children.remove(object);
parent.addChild(object);
parent.addChild(object, parentInverse);
super.run();
}