📜  相机抖动 godot - 任何代码示例

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

代码示例1
# Animate this to increase/decrease/fade the shaking
var shake_amount = 1.0

func _process(delta):
    camera.set_offset(Vector2( \
        rand_range(-1.0, 1.0) * shake_amount, \
        rand_range(-1.0, 1.0) * shake_amount \
    ))