From c79cc5df0e6c5acdc82bb104a22b74edf9b9a492 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Fri, 20 Mar 2020 10:17:33 +0100 Subject: [PATCH] Use degrees for mapping node --- Sources/arm/node/Material.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/arm/node/Material.hx b/Sources/arm/node/Material.hx index 678ff7f1..50906c40 100644 --- a/Sources/arm/node/Material.hx +++ b/Sources/arm/node/Material.hx @@ -846,7 +846,7 @@ class Material { } if (node_rotation[2] != 0.0) { // ZYX rotation, Z axis for now.. - var a = node_rotation[2]; + var a = node_rotation[2] * (Math.PI / 180); // x * cos(theta) - y * sin(theta) // x * sin(theta) + y * cos(theta) out = 'vec3(${out}.x * ${Math.cos(a)} - (${out}.y) * ${Math.sin(a)}, ${out}.x * ${Math.sin(a)} + (${out}.y) * ${Math.cos(a)}, 0.0)';