Skip to content

Commit 269e5b1

Browse files
committed
Merge pull request #5 from Starwaster/Dev
Remove input normalization
2 parents 1f987b6 + 0e38e98 commit 269e5b1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Source/ModuleRCSFX.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,15 @@ public override void OnStart(StartState state)
242242
if (xform.position != Vector3.zero)
243243
{
244244
Vector3 position = xform.position;
245-
Vector3 torque = Vector3.Cross(inputAngular.normalized, (position - CoM).normalized);
245+
Vector3 torque = Vector3.Cross(inputAngular, (position - CoM).normalized);
246246

247247
Vector3 thruster;
248248
if (useZaxis)
249249
thruster = xform.forward;
250250
else
251251
thruster = xform.up;
252252
float thrust = Mathf.Max(Vector3.Dot(thruster, torque), 0f);
253-
thrust += Mathf.Max(Vector3.Dot(thruster, inputLinear.normalized), 0f);
253+
thrust += Mathf.Max(Vector3.Dot(thruster, inputLinear), 0f);
254254

255255
// thrust should now be normalized 0-1.
256256

@@ -353,4 +353,4 @@ private void UpdatePropellantStatus()
353353
}
354354

355355
}
356-
356+

0 commit comments

Comments
 (0)