From 0e38e98e3d4999c1dd53be88f933530849f7e4e6 Mon Sep 17 00:00:00 2001 From: Starwaster Date: Sun, 23 Aug 2015 18:19:42 -0400 Subject: [PATCH] Remove input normalization * Removed input normalization. (normalized inputs results in incorrect thrust level and wreaks havoc on MechJeb) --- Source/ModuleRCSFX.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/ModuleRCSFX.cs b/Source/ModuleRCSFX.cs index 6deb90f..b6dd9d0 100644 --- a/Source/ModuleRCSFX.cs +++ b/Source/ModuleRCSFX.cs @@ -242,7 +242,7 @@ public override void OnStart(StartState state) if (xform.position != Vector3.zero) { Vector3 position = xform.position; - Vector3 torque = Vector3.Cross(inputAngular.normalized, (position - CoM).normalized); + Vector3 torque = Vector3.Cross(inputAngular, (position - CoM).normalized); Vector3 thruster; if (useZaxis) @@ -250,7 +250,7 @@ public override void OnStart(StartState state) else thruster = xform.up; float thrust = Mathf.Max(Vector3.Dot(thruster, torque), 0f); - thrust += Mathf.Max(Vector3.Dot(thruster, inputLinear.normalized), 0f); + thrust += Mathf.Max(Vector3.Dot(thruster, inputLinear), 0f); // thrust should now be normalized 0-1. @@ -353,4 +353,4 @@ private void UpdatePropellantStatus() } } - \ No newline at end of file +