![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Diet Estus |
I have a Camera2D
using which I’ve implemented crude camera shake. Currently, I simply change the camera’s offset periodically using a timer.
func OnTimerTimeout():
offset.x = rand_range(-shift, shift)
offset.y = rand_range(-shift, shift)
Using this method, the camera jumps discretely every time the offset changes.
I dislike how jarring this is and want the camera to move smoothly from one position to another.
It should be possible to implement this using a Perlin noise function that takes time and a seed as input and returns continuous noise between (0,1).
I’m not sure how to access such a function in Godot, or how I would use it if I had it.
Any ideas?