fix thruster light positions

This commit is contained in:
Mister_Nebula 2021-10-27 10:10:33 +01:00
parent 273b8f713e
commit 3e049c9f81

View File

@ -47,7 +47,25 @@ namespace QSB.Animation.Player.Thrusters
var gameObject = controller.gameObject;
var oldThruster = controller.GetValue<Thruster>("_thruster");
var oldLight = controller.GetValue<Light>("_light");
oldLight.transform.localPosition = Vector3.zero;
// pain
Vector3 localPos;
switch (oldThruster)
{
case Thruster.Up_RightThruster:
case Thruster.Up_LeftThruster:
localPos = new Vector3(0, 0, 3);
break;
case Thruster.Down_RightThruster:
case Thruster.Down_LeftThruster:
localPos = new Vector3(0, 0, 7);
break;
default:
localPos = new Vector3(0, 0, 5);
break;
}
oldLight.transform.localPosition = localPos;
var oldAnimCurve = controller.GetValue<AnimationCurve>("_scaleByThrust");
var oldScaleSpring = controller.GetValue<DampedSpring>("_scaleSpring");
var oldScalar = controller.GetValue<float>("_belowMaxThrustScalar");