Skip to content

Question: obtain mouse position in world coordinates #9

Answered by doonv
iulianR asked this question in Q&A
Discussion options

You must be logged in to vote

You need to convert the cursor position from being a cursor position on the window, to a cursor position on the PixelCamera's viewport.

The way you do this depends on what ViewportSize you use (I will probably implement a function for this in the future). But for ViewportSize::PixelFixed you can just divide the cursor position by the value in PixelFixed(value)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by iulianR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #8 on April 06, 2024 18:01.