to the man: Anonymous Poster

Started by
10 comments, last by ruellm 20 years, 8 months ago
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
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"
----------------------------------------------Petter Nordlander"There are only 10 kinds of people in the world. They who understand binary and those who do not"
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.
YEHEY thanks FRIEND...!

anyways heres my email address ruellm@yahoo.com

Is there anyway i can contact u (Mr. Anonymous) ayd from forums?

You could always try the ''Mail'' button if you find one.
[s]--------------------------------------------------------[/s]chromecode.com - software with source code
Don''t trust Anonymous Poster, he''s known for sending viruses.
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!

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
there is only ME. i am the ONE! bwahahaha.

This topic is closed to new replies.

Advertisement