pull/2/head
jaysunxiao 2022-07-02 12:24:28 +08:00
parent 33e5718b25
commit 91a3583e5b
1 changed files with 1 additions and 1 deletions

View File

@ -25,6 +25,6 @@ func _physics_process(delta):
velocity = velocity.normalized() * speed
# false这个选项参数看意思是把无限惯性关了这个关了之后就不会向碰撞的刚体施加作用力需要你自己去写
var info: KinematicCollision2D = move_and_collide(velocity * delta)
var info: KinematicCollision2D = move_and_collide(velocity * delta, false)
if info != null:
print(info.collider.name)