Stephan Schaefer(cloudtales)

Velocity, _physics_process

Hi, you said _phsyics_process is called 30/60 times per second, depending on the configuration of thephysics engine. And you set the Vector2D to (300,0) and said it will move 300px on the X-axis. But this couldn't be true - When this function is called at least 30 time per second and we move 300px each time, we should't even see the movement, becuase it will be too fast. Can you please ellaborate? Cheers, Stephan
  • c
    Stephan Schaefer(cloudtales) replied

    Okay, after reading the documentation of move_and_slide. It seem the veloicty is multiplied by a number delta. It says:

    l"inear_velocity is the velocity vector in pixels per second. Unlike in move_and_collide(), you should not multiply it by delta — the physics engine handles applying the velocity."

  • Nathan Lovato replied

    To add to your answer, a linear velocity is a speed in a given direction - it's not in pixels, but in pixels per second in our case.