![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | livingstone |
Hi all,
I have check all previous questions I came across around mouse positioning with no luck.
I need to know the exact position within a texture (in order to get the Color, for reasons not relevant at this point) that the mouse is over.
My scene is a Control
with only a TextureRect disposed to full rect with a slighly bigger that it should texture that is scaled down by setting the Expand
property to true.
Control
\-> TextureRect
In order to get the exact pixel I’ve tried :
- get_local_mouse_position()
- get_viewport().get_mouse_position()
- get_global_mouse_position()
At this point I’m assuming that the TextureRect has applied a transformation that I need to apply too, but can’t quite find it.
How could I get the exact position within a texture in a texturebox where the mouse pointer is over
A project to replicate the problen can be found here:
https://drive.google.com/open?id=1EevyFCUTfsg2z1gB0tca69ieXb6YW7V4