1
This commit is contained in:
@@ -138,10 +138,10 @@ namespace BITFALL.Entities.Player.Movement.States
|
||||
{
|
||||
actor.ForceNotGrounded();
|
||||
|
||||
if (characterController.landFreeze.AllowUpdateWithoutReset is false)
|
||||
{
|
||||
currentVelocity = Vector3.Lerp(currentVelocity, default, 0.8f);
|
||||
}
|
||||
// if (characterController.landFreeze.AllowUpdateWithoutReset is false)
|
||||
// {
|
||||
// currentVelocity = Vector3.Lerp(currentVelocity, default, 0.8f);
|
||||
// }
|
||||
|
||||
currentVelocity.y+= initialJumpForce;
|
||||
|
||||
@@ -190,11 +190,18 @@ namespace BITFALL.Entities.Player.Movement.States
|
||||
// Apply added velocity
|
||||
currentVelocity += addedVelocity;
|
||||
}
|
||||
else
|
||||
{
|
||||
var tempVelocity = currentVelocity;
|
||||
tempVelocity = Vector3.Lerp(tempVelocity, default, 2*deltaTime);
|
||||
currentVelocity.x = tempVelocity.x;
|
||||
currentVelocity.z = tempVelocity.z;
|
||||
}
|
||||
// Gravity
|
||||
|
||||
currentVelocity += -Vector3.up * (30 * deltaTime);
|
||||
// Drag
|
||||
currentVelocity *= (1f / (1f + (0.1f * deltaTime)));
|
||||
currentVelocity *= (1f / (1f + 0.1f * deltaTime));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user