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 Professional Discussion / Placing objects with mouse?

Author
Message
Zeus
20
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 2nd Dec 2010 04:28
I took a look at pick screen and the only thing I can gather is it will only really work if you are trying to click and drag the object. I need to make it to where if you click the mouse, it will place the object on the x and z axis by converting the mouse's coordinates to 3d. Either I don't understand the pick screen command or it doesn't do what I need it to. How would I come about this?

Thanks!
Zeus
MSon
22
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 2nd Dec 2010 05:17
It sounds like Click and drag your discribing unless im reading it wrong,However heres a click and drag example.



Mugen Wizardry
User Banned
Posted: 2nd Dec 2010 06:51 Edited at: 2nd Dec 2010 06:51
Here ya go. I upgraded it so it works with up to 1 million objects, and u can move either a sphere, a cube, or a cone



Enjoy! ^^

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Zeus
20
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 2nd Dec 2010 12:47
Actually I am looking for just clicking and the object being placed, no dragging.
TuPP3
19
Years of Service
User Offline
Joined: 26th Jan 2007
Location: [+--]FINLAND
Posted: 2nd Dec 2010 13:06 Edited at: 2nd Dec 2010 13:08
Is it possible for you to use physics engine? Newton can do this and I'm quite sure Sparky's also.

Just use raycast to get the hit coordinates and you can also receive the angle of the surface hit.
It would make it far simpler for you, but I don't know what you need this for.
TeeJay
18
Years of Service
User Offline
Joined: 30th Dec 2007
Location:
Posted: 2nd Dec 2010 13:31 Edited at: 2nd Dec 2010 16:54
Deleted.
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 2nd Dec 2010 16:45
^wrong thread...

DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 2nd Dec 2010 17:32
I think this is what you are after. I have used it in a fair few (unfinished ) projects so far. Very useful for RTS type games.

I have left the basic check object visible, but rem in the lines I remmed out and it will be hidden and you can use another object terrain for your floor. I would imagine this works fine with a terrain object and adding in the y value as well instead of having it flat at 0.

http://s6.bitefight.org/c.php?uid=103081
Zeus
20
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 2nd Dec 2010 18:00
Perfect! Thank you so much!

Login to post a reply

Server time is: 2026-07-21 18:58:23
Your offset time is: 2026-07-21 18:58:23