Calculate transform data directly

This commit is contained in:
Sandy 2019-12-07 22:07:31 +09:00 committed by GitHub
parent 528524d861
commit 3531551288
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,26 @@
package armory.logicnode;
import iron.math.Vec4;
import iron.math.Mat4;
class TransformMathNode extends LogicNode {
public var property0:String;
var m = Mat4.identity();
public function new(tree:LogicTree) {
super(tree);
}
override function get(from:Int):Dynamic {
var m1:Mat4 = inputs[0].get();
var m2:Mat4 = inputs[1].get();
if (m1 == null || m2 == null) return null;
m.setFrom(m1);
m.transformMath(m2);
return m;
}
}