Advertisement
rooksword

Camera Code

Apr 7th, 2020
1,429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ///Movement
  2.  
  3. x = lerp(x,obj_player.x,acc);
  4. y = lerp(y,obj_player.y,acc);
  5.  
  6. x += random_range(-shake,shake);
  7. y += random_range(-shake,shake);
  8. shake = lerp(shake,0,0.1);
  9.  
  10. view_xview = -(view_wview/2)+x;
  11. view_yview = -(view_hview/2)+y;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement