I have a kinematic 2d which moves with MoveAndSlide(velocity, Vector.Up) in _process
Lag doesn't change horizontal moving speed and it moves always with the same speed but jump height is always changing with fps
How to solve that?
Also there isn't such a problem while i use the code with _physicsProcces .but i can't use that because it causes lag when a there is a lot of nodes with that script in tree
void Jump()
{
velocity.y=-JumpForce;
}
void Move()
{
velocity.y+= Gravity;
velocity.x=MovementSpeed;
}
public override void _Process(float delta)
{
velocity=MoveAndSlide (velocity, Vector.Up)
}