Explorar o código

Merge pull request #18 from MathemanFlo/CameraSpeed

Add lightAngle to Context
Lubos Lenco %!s(int64=3) %!d(string=hai) anos
pai
achega
92d6b70228
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      Sources/arm/Camera.hx

+ 1 - 0
Sources/arm/Camera.hx

@@ -180,6 +180,7 @@ class Camera {
 				redraws = 2;
 				var light = iron.Scene.active.lights[0];
 				var m = iron.math.Mat4.identity();
+				Context.lightAngle = (Context.lightAngle + ((mouse.movementX / 100) % (2*Math.PI) + 2*Math.PI)) % (2*Math.PI);
 				m.self = kha.math.FastMatrix4.rotationZ(mouse.movementX / 100);
 				light.transform.local.multmat(m);
 				light.transform.decompose();