Hitbox
Last updated
// Basic collision detection with mouse
goto 100 100
hitbox 50 50 mouse_x mouse_y
if collided (
log "Mouse is over the 50x50 area at (100,100)"
)
// Multiple hitboxes for a complex shape
goto 200 200
hitbox 100 20 mouse_x mouse_y // horizontal bar
goto 240 160
hitbox 20 100 mouse_x mouse_y // vertical bar
if collided (
log "Mouse is over the cross shape"
)
// Debug visualization
hitbox "show" // Make hitboxes visible during development
// ... your collision code here ...
hitbox "hide" // Hide hitboxes again