I'm developing a simple OpenGL game and I have some square buttons on the main screen (aka main menu). I want to detect a point-square collision so I'll know which button the user clicked. Any suggestions?
PS: I'm using C.
Point-Square Collision Detection
Page 1 of 11 Replies - 433 Views - Last Post: 18 August 2012 - 07:55 PM
Replies To: Point-Square Collision Detection
#2
Re: Point-Square Collision Detection
Posted 18 August 2012 - 07:55 PM
A simple check to see if the point is in the rectangle or square seems to be pretty straightforward to implement. Were you hoping somebody would point you to a pre-baked function?
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|