Advertisement
otorp2

camera shake

Jul 5th, 2016
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. # Animate this to increase/decrease/fade the shaking
  2. var shake_amount = 1.0
  3.  
  4. func _process(delta):
  5. camera.set_offset(Vector2( \
  6. rand_range(-1.0, 1.0) * shake_amount, \
  7. rand_range(-1.0, 1.0) * shake_amount \
  8. ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement