Replies: 2 comments
-
OK, it turns out I was just getting confused vis-a-vis the difference between a logical and a physical pixel:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for the kind words 🙏 And great you managed to figure it out, physical vs logical pixels are always a pain point. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, so if you have a position in world space, you can convert it to a pixel on the screen with Camera::pixel_at_position - but if you then give that to egui, to position an element, there's another transformation - something to do with aspect ratio, DPI, etc.
I had a look around to see if I could work out what's going on, but had no luck. Anyway, this would be kind of useful if you want to position egui elements relative to objects in world space.
PS: Love your work, think the design is really nice.
Beta Was this translation helpful? Give feedback.
All reactions