Advertisement
Guest User

Untitled

a guest
Jan 5th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ///rotate(n)
  2. n = argument0
  3.  
  4. orientationGoal = point_direction(x, y, obj_circle.x, obj_circle.y)
  5. orientationInit = image_angle
  6.  
  7. gap = orientationGoal - orientationInit
  8.  
  9. if (gap > 0) {
  10.    
  11.     for(i=0 ; i < n ; i++){
  12.         image_angle += gap/n
  13.     }
  14.    
  15. }
  16.  
  17. else if (gap < 0) {
  18.    
  19.     for(i=0 ; i < n ; i++){
  20.         image_angle -= gap/n
  21.     }
  22.    
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement