do not modify velocity from impulse
parent
548e9131f2
commit
488ace3149
|
@ -39,13 +39,14 @@ namespace SupaLidlGame.Characters.State
|
||||||
{
|
{
|
||||||
Character.Velocity += Character.Direction.Normalized()
|
Character.Velocity += Character.Direction.Normalized()
|
||||||
* Character.Speed;
|
* Character.Speed;
|
||||||
|
// we should only modify velocity that is in the player's control
|
||||||
|
Character.ModifyVelocity();
|
||||||
}
|
}
|
||||||
|
|
||||||
Character.NetImpulse = Character.NetImpulse.MoveToward(
|
Character.NetImpulse = Character.NetImpulse.MoveToward(
|
||||||
Vector2.Zero,
|
Vector2.Zero,
|
||||||
(float)delta * Character.Speed * Character.Friction);
|
(float)delta * Character.Speed * Character.Friction);
|
||||||
|
|
||||||
Character.ModifyVelocity();
|
|
||||||
Character.MoveAndSlide();
|
Character.MoveAndSlide();
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue