Move_and_slide is moving and sliding when it shouldn't be

My Godot version is 4.3

The move_and_slide function is causing slight sliding when I run it. I know it’s the move_and_slide function after doing some debugging, because it only begins to change the positioning after the move_and_slide function runs.

It only changes the positioning of the player on the X and Z axes, and it only changes by a very minimal amount. To the point where the only way to tell it’s moving is through the use of print() statements or looking really closely at the pixels, but I could feel that something was off before I even realized the problem. So it isn’t a massive deal, but it makes the game feel janky and unfinished (which it is, but I’d like to solve this issue now rather than later.)

This is the part of the code in which I suspect it’s occurring. As my game is in the very early prototyping stages, this is the only script there is.

I should mention that what I am trying to do is create a camera system similar to that of Ocarina of Time.

Please help me, oh people who are smarter than me

Why are you multiplying the delta with that velotttity, you did not need to do this, you can normally write that.

1 Like

Oh, I thought I had to use the delta to make it sync up with different screen frequencies… what’s the point of the delta in that case?

1 Like

In most cases multiplying by delta for movement calculations makes sense, but move_and_slide() method is kinda an exception, because internally it uses the delta already, so there’s no need to multiply the velocity by delta yourself.

There is this proposal to externalize this calculation, so maybe in the future this will change.

Ohhhh really? That’s actually really interesting, thank you! I’ll see if removing delta helps

Update: It seems to have slowed down the movement even further, but it’s still on the move