object selection
I''m writing a 2D/3D game (think warcraft3), and I''m trying to figure out how to deal with mouse selection. I want the user to be able to click somewhere and have their character move to that place on the map, but I don''t know how to convert the mouse coordinates to the point on the ground. One option that I don''t want to do is to tile the ground in selection mode, determine if one of the tiles has been selected, and then move the character there. That seems like a BAD solution to me, especially since there is a limit on the number of objects that can be in the selection buffer.
It seems as though this problem should have come up before. Is there any nice way of solving it?
Any help is greatly appreciated,
Jesse Beder
Can't you use glUnProject() (don't ask me how it works, but I think that what it's used for
EDIT: ups... its gluUnProject... still don't know how it works, though!
[edited by - NeViL tHe dEVil on September 25, 2003 5:01:38 PM]
EDIT: ups... its gluUnProject... still don't know how it works, though!
[edited by - NeViL tHe dEVil on September 25, 2003 5:01:38 PM]
------------------------------------------------------ Regret Nothing - Learn Everything
September 26, 2003 02:44 AM
http://onemancrew.sinfree.net
under downloads you''ll find example.
under downloads you''ll find example.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement