Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / 2d selection on 3d objects without sparky?

Author
Message
313
17
Years of Service
User Offline
Joined: 29th Sep 2007
Location: Poland
Posted: 29th Sep 2007 16:06
Is there any possibility to make 3d objects mouse selecting without sparky's dll's (doesn't work with my dbc)? It would be very useful for me..

war.. war never changes..
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 29th Sep 2007 17:00
Yeah, there's an RTS tutorial that teaches you how to do it.
Try searching for it.

In programming, nothing exists
Insert Name Here
18
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 29th Sep 2007 17:19
You can use object screen x() and object screen y()

Our home is our world, our life, home is our world...
Homeworld: The ladder
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 29th Sep 2007 17:37 Edited at: 29th Sep 2007 17:38
yes but that will only return the exact centre of the object.
Does anyone know what the calculations for OBJECT SCREEN x/y() is?
You could make a selection box and then check if the object position is inside it.

In programming, nothing exists
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 29th Sep 2007 21:21
Kevin Picone wrote one. It can be found under products/source codes/DB @ www.underwaredesign.com
Insert Name Here
18
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 29th Sep 2007 21:32
Quote: "yes but that will only return the exact centre of the object."

Is there an object screen width()? Then you could use
object screen x()-(object screen width()/2) and object screen x()+(object screen width()/2)

Our home is our world, our life, home is our world...
Homeworld: The ladder
313
17
Years of Service
User Offline
Joined: 29th Sep 2007
Location: Poland
Posted: 3rd Oct 2007 00:54
thanx very much for "object screen x() and object screen y()". for my board-computer game will be enough.

war.. war never changes..

Login to post a reply

Server time is: 2025-05-31 20:43:09
Your offset time is: 2025-05-31 20:43:09