This commit is contained in:
CortexCore
2023-09-01 14:33:54 +08:00
parent 4fadd3a530
commit 8ef5c7ec0a
451 changed files with 1048940 additions and 2028 deletions

View File

@@ -37,11 +37,14 @@ namespace BITFALL.Entities.Player.Movement.States
// Smooth movement Velocity
currentVelocity = Vector3.Lerp(currentVelocity, targetMovementVelocity, 1f - Mathf.Exp(-16 * deltaTime));
if (!characterController.ExpectJump.shouldBe) return;
actor.ForceNotGrounded();
currentVelocity += Vector3.up * initialJumpForce;
characterController.ExpectJump.Reset();
if (characterController.ExpectJump.shouldBe)
{
actor.ForceNotGrounded();
currentVelocity += Vector3.up * initialJumpForce;
characterController.ExpectJump.Reset();
characterController.ExecuteCommand<OnPlayerJumpCommand>();
}
}
else
{