|
Hi, I'm overlaying a GUI texture to the position of the mouse. However, the actual click point, the end of the cursor, is off by a little to the left and up of my actual texture. How do I fix this? Here's my script:
(comments are locked)
|
|
You need to offset the rect by half the width and height: var pos : Rect = Rect(mousePos.x - cursorImage.width / 2.0, Screen.height - mousePos.y - cursorImage.height / 2.0, cursorImage.width, cursorImage.height); Right, thanks. Accepted
Aug 02 '10 at 09:37 PM
e.bonneville
(comments are locked)
|
