Merge pull request #1271 from zaethan/master

small fix for rotate around axis node
This commit is contained in:
Lubos Lenco 2019-05-09 22:42:04 +02:00 committed by GitHub
commit 4fd7451e19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,13 +12,13 @@ class RotateObjectAroundAxisNode extends LogicNode {
override function run(from:Int) {
var object:Object = inputs[1].get();
var axis:Vec4 = inputs[2].get().normalize();
var axis:Vec4 = inputs[2].get();
var angle:Float = inputs[3].get();
if (object == null || axis == null) return;
// the rotate function already calls buildMatrix
object.transform.rotate(axis, angle);
object.transform.rotate(axis.normalize(), angle);
#if arm_physics
var rigidBody = object.getTrait(RigidBody);