Hello,
I tried to create a RectangleShape that start-point of it at 0, 0 (the set position is in this point), the angle of it is 300, and the end-point is: {x=-7.73381662 y=-349.914551 }.
The calculate of the end-point by:
// calculate the second point of the stick by point1 and the angle
point2 = { point1.x + (float)(cos(angle)*STICK_LENGTH) , point1.y + (float)(sin(angle)*STICK_LENGTH) };
when I click on the end-point in the rectangle it gives me completely different values:
The mouseCoords is: {x=432.999969 y=245.000031 }.
auto mouseCoords = window.mapPixelToCoords({ event.mouseButton.x, event.mouseButton.y });
how I can get the really values of the point?
Thank you