📜  godot 移动和滑动不起作用 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:40.494000             🧑  作者: Mango

代码示例1
1) You should not be using move_and_slide in _process(). Use _physics_process().
2) move_and_slide() uses pixels per second, so you should not multiply by delta

Per the docs for KinematicBody2D:

linearvelocity is a value in pixels per second. Unlike in for example moveand_collide, you should not multiply it with delta — this is done by the method.