SFML community forums

Help => General => Topic started by: Akatray on August 26, 2013, 05:17:24 pm

Title: Picking objects with mouse
Post by: Akatray on August 26, 2013, 05:17:24 pm
How to pick rectangle object when view moves and rotates.
Title: Re: Picking objects with mouse
Post by: eXpl0it3r on August 26, 2013, 05:38:18 pm
Given the minimal question, here goes a minimal answer:

Official view tutorial (http://www.sfml-dev.org/tutorials/2.1/graphics-view.php)
window.mapToPixelCoords() (http://www.sfml-dev.org/documentation/2.1/classsf_1_1RenderTarget.php#a2b0cab0e4c6af29d4efaba149d28116d)
window.mapCoordToPixel() (http://www.sfml-dev.org/documentation/2.1/classsf_1_1RenderTarget.php#aa0c11e1989573f2cce64c621205f8e83)
Title: Re: Picking objects with mouse
Post by: Akatray on August 26, 2013, 05:57:04 pm
Thanks. I somewhat overviewed that in tutorial.