Hey, I'm trying to move a sprite to the mouse click location. How can i get it's coordinates?
Thanks!
Hey, I'm trying to move a sprite to the mouse click location. How can i get it's coordinates?
Thanks!
Assuming you are in an event responder method (e.g. mouseDown:
):
[myView convertPointFromBase:[NSEvent mouseLocation]];