feat: Sample Air Movement Updated
- AirMovement1D updated to slow down if it's going faster than the BaseSpeed along X axis
This commit is contained in:
parent
119cc2c628
commit
9bd1b3cd4a
|
@ -33,12 +33,8 @@ namespace Syntriax.Modules.Movement.Samples
|
|||
velocity.x += moveValue * Time.fixedDeltaTime;
|
||||
|
||||
if (moveValue != 0f)
|
||||
{
|
||||
if (Mathf.Abs(velocity.x) > Mathf.Abs(moveValue))
|
||||
velocity.x = moveValue;
|
||||
else if (Mathf.Abs(velocity.x - moveValue) > Mathf.Abs(moveValue))
|
||||
velocity.x += moveValue * Time.fixedDeltaTime;
|
||||
}
|
||||
velocity.x *= .95f;
|
||||
|
||||
rigid.velocity = velocity;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue