Skip to content

Instantly share code, notes, and snippets.

@sonic2kk
Created July 16, 2015 20:00
Show Gist options
  • Save sonic2kk/533f492fa05557d2e2a5 to your computer and use it in GitHub Desktop.
Save sonic2kk/533f492fa05557d2e2a5 to your computer and use it in GitHub Desktop.
Simple function for rectangle/mouse collision
function rectmouse_colliding(mouse_x, mouse_y, x, y, width, height)
return mouse_x > x and mouse_y < x + width and mouse_y > y and mouse_y < y + height
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment