• Advertisement

Archived

This topic is now archived and is closed to further replies.

to the man: Anonymous Poster

This topic is 5303 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hey, can i ask for some sample SOURCE code on how to make SELECTION on 3d RTS? even a simple one, an object place on a terrain will do... thanks ruel

Share this post


Link to post
Share on other sites
Advertisement
I don''t really get your question, but I think you mean how to select one/many units in 3d with the mouse?!

However, that is very easy to achive..

let the mouse create a 2d box aligned with X-Z plane. Check if the object are inside that box and skip the Y coord.

if ( obj.x < box.max.x AND obj.x > box.min.x )
if ( obj.y < box.max.y AND obj.y > box.min.y )
obj.selected = true;

or something like that.. :-)

I hope I didn''t missunderstand you!

----------------------------------------------
Petter Nordlander

"There are only 10 kinds of people in the world. The who understand binary and those who don''t"

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
ok I''ll send you my whole project. If you can get selecting the terrain to work (as far as I know my way should work, it just doesn''t) please send me a copy back.

Share this post


Link to post
Share on other sites
Don''t trust Anonymous Poster, he''s known for sending viruses.

Share this post


Link to post
Share on other sites
How do you even begin to write an RTS if you can''t figure out how to select a unit with the mouse? C''mon people!

Share this post


Link to post
Share on other sites
quote:
Original post by Stonicus
How do you even begin to write an RTS if you can''t figure out how to select a unit with the mouse? C''mon people!




Or if you think that "Anonymous Poster" is a single, unique individual...

-Odd the Hermit

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
there is only ME. i am the ONE! bwahahaha.

Share this post


Link to post
Share on other sites
I bet there IS only one AP, and s/he has multiple personality disorder.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I have only posted a couple of times in the last year or so. I could login, in fact I did in the DirectX forum as Glak. I just don''t choose to usually.

Share this post


Link to post
Share on other sites

  • Advertisement