Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Rotate to face toward mouse
- var _tgt_angle = point_direction(x, y, argument0, argument1);
- image_angle -= angle_difference(image_angle, _tgt_angle) * 0.3;
- //This code can be used to restrict rotation to a range
- //image_angle = clamp(image_angle, angle_min, angle_max);
- image_angle = wrap(image_angle, 0, 360);
Advertisement
Add Comment
Please, Sign In to add comment