samedi 28 novembre 2015

My mouse position isn't correct

I have an editor for my game and at the normal resolution of 1280*720, the object which i create will be exactly on the mouse position.

I simply get the position of the mouse to and add it by half width half height of the window to set the position for my object.

But when i stretch the window, the position goes wrong.

My objects are scaled according to the new width and height of the window.

Aucun commentaire:

Enregistrer un commentaire