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;
|
velocity.x += moveValue * Time.fixedDeltaTime;
|
||||||
|
|
||||||
if (moveValue != 0f)
|
if (moveValue != 0f)
|
||||||
{
|
|
||||||
if (Mathf.Abs(velocity.x) > Mathf.Abs(moveValue))
|
if (Mathf.Abs(velocity.x) > Mathf.Abs(moveValue))
|
||||||
velocity.x = moveValue;
|
velocity.x *= .95f;
|
||||||
else if (Mathf.Abs(velocity.x - moveValue) > Mathf.Abs(moveValue))
|
|
||||||
velocity.x += moveValue * Time.fixedDeltaTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
rigid.velocity = velocity;
|
rigid.velocity = velocity;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user