armory/Sources/armory/logicnode/GetTransformNode.hx

19 lines
318 B
Haxe
Raw Permalink Normal View History

2017-03-21 03:06:38 +01:00
package armory.logicnode;
2017-11-20 15:16:52 +01:00
import iron.object.Object;
2017-04-04 23:11:31 +02:00
2017-04-08 20:05:35 +02:00
class GetTransformNode extends LogicNode {
2017-03-21 03:06:38 +01:00
2019-12-19 23:54:08 +01:00
public function new(tree: LogicTree) {
2017-04-04 23:11:31 +02:00
super(tree);
2017-03-21 03:06:38 +01:00
}
2019-12-19 23:54:08 +01:00
override function get(from: Int): Dynamic {
var object: Object = inputs[0].get();
2017-04-02 23:26:27 +02:00
2017-09-20 14:27:45 +02:00
if (object == null) return null;
2017-04-02 23:26:27 +02:00
2017-07-14 18:07:30 +02:00
return object.transform.world;
2017-03-21 03:06:38 +01:00
}
}