Loading a picture and having it move
in
Programming Questions
•
2 years ago
I want to load a picture as an object at the center of the lower quarter of the window and I want it to load everytime a mouse is pressed. When the picture loads I want it to be turned so the top of it is pointing towards the mouse, as in rotated to the angle equal to tan=(.75windowHeight-mouseY)/(.5windowWidth-mouseX) that is if the mouseX is greater than half of the windowWidth and if less tan=(.75windowHeight-mouseY)/(mouseX). Then from that angle I want the picture to move towards the cordinates of where the mouse was pressed and have it replaced in turn by another picture. In short I want a picture that is in the shape of a rectangle to appear everytime the mouse is pressed and have it face the were the mouse was pressed and move towards that, then be replaced by a different picture.
1