GodotでRigidbody2dのプレイヤーへの衝突検出してCameraをshakeする
Rigidbody2d はデフォルトだと衝突検出しないので、Contacts Reported を 1以上にして、Contact Monitor を ON にする
How to detect collisions between RigidBody2D and KinematicBody2D - Godot Engine - Q&A
RigidBody2D can report collisions (contact monitor need to be enabled and set to more than zero) and you can get them via signal (body_enter) or checking on fixed process/custom integrator (get_colliding_bodies).
すると下記の signal で衝突検出できるので、Camera Shake メソッドを呼び出す
code:gdscript
func _on_Player_body_entered(body):
print("player collided!")
$Camera2D._camera_shake()
Godot3.5でCamera shake
#Godot_Engine