💬

Community answer

Collected from the ACE community Discord archive around 2022-11-01. It may be informal or outdated — anyone can edit this page to improve it. Original discussion

Hit-testing cursor over screen elements

🖼️ RenderingUpdated 2 days ago•0 views
pos = render.cursorPos(player()) returns cursor pos in screen space - check it against your element's rect (e.g. 0<x<512 and 0<y<80); condense into a function.

Best way to check if the cursor is over a HUD/screen element

pos = render.cursorPos(player()) returns cursor pos in screen space - check it against your element's rect (e.g. 0<x<512 and 0<y<80); condense into a function.

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.