Integrate source airborne tilt and logical-root rendering
This commit is contained in:
1 parent
a61f1b0284
commit
27be8ed630
36 files changed
+1953
-62
No files matched your search
@@ -18,10 +18,11 @@ public static class BubbleMotion
|
||||
public const float HeldBounceSpeed = 900;
|
||||
|
||||
public static BubbleSteering StepInput(float speed, float turn, PlayerInput input,
|
||||
bool supported, float seconds, float maximumSpeed = MaximumSpeed)
|
||||
bool supported, float seconds, float maximumSpeed = MaximumSpeed,
|
||||
float forwardPitch=-10,float backwardPitch=10)
|
||||
{
|
||||
Validate(speed, turn, seconds);
|
||||
if (!float.IsFinite(maximumSpeed) || maximumSpeed <= 0)
|
||||
if (!float.IsFinite(maximumSpeed) || maximumSpeed <= 0||!float.IsFinite(forwardPitch)||!float.IsFinite(backwardPitch))
|
||||
throw new ArgumentOutOfRangeException(nameof(maximumSpeed));
|
||||
|
||||
var turnStep = AirSteering.TurnAcceleration * seconds;
|
||||
@@ -48,7 +49,7 @@ public static class BubbleMotion
|
||||
}
|
||||
|
||||
turn = Math.Clamp(turn, -TurnLimit, TurnLimit);
|
||||
return new(speed, turn, forward ? -10 : input.Backward ? 10 : 0, -.25f * turn);
|
||||
return new(speed, turn, forward ? forwardPitch : input.Backward ? backwardPitch : 0, -.25f * turn);
|
||||
}
|
||||
|
||||
public static BubbleApply StepApply(float speed, float turn, float yaw, float pitch,
|
||||
|
||||
Reference in new issue
Block a user