Hi,
Please help me understanding the concept behind this.
I have set the sprite at some location on game window with use_fixed_fit_projection and register for input events .
On touching the sprite I am getting
actionX: 204.5 window_size_x: 640
after resizing the window, and touching same sprite I am getting following:
actionX: 266.37240600586 window_size_x: 1450
while setting sprites to position or go.get_position are synchronised with previous coordinates even after resizing the window.
but input coordinates are updating as per new window but within game set width and height but are scaling.
How do I get the input coordinates as if the game coordinates?
is following calculation correct ?
This refers to the actual mouse pixel position within the window, scaled to the display size specified in game.project. These are the values from action.x and action.y in on_input().
Window coordinates
This refers to the actual mouse pixel position within the window. These are the values from action.screen_x and action.screen_y in on_input(). Window coordinates should be provided as is, without compensation for High DPI (this will be done automatically).