Game Development Community

How to detect a mouse click on a sprite?

by Mike Jensen · in Torque X 2D · 07/10/2007 (6:55 pm) · 5 replies

Hi

I'm looking for a way to detect when the user clicks on a sprite with the mouse. Can anyone advise how to do this please ?

Thanks
Mike

About the author

Recent Threads


#1
07/10/2007 (7:06 pm)
I think someone posted a resource on how to do this a couple weeks ago, but I forget what it was called. If I find it I'll let you know.
#2
07/10/2007 (7:12 pm)
Thanks Thomas
#3
07/10/2007 (7:13 pm)
Ok, I can't find the post, but I found this other post about how to get the mouse position in world coordinates. You can then use that position to do a scene container query for a list of objects at that location.
#4
07/10/2007 (9:29 pm)
Thanks again!
#5
07/18/2007 (2:21 pm)
Here it is.

http://www.garagegames.com/mg/forums/result.thread.php?qt=56898