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.

Author
Message
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 13th Mar 2006 18:31
ok i might start making a modeler but i need some draging help.

say i used the make object cube command (just an example) how would i mak eit so that you can drag it around with the mouse when it is clicked on? thank you.

Check out my site!(unfinished)
http://www.freewebs.com/dbnewbie/
Dodic
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location: SNM (Serbia&Montenegro)
Posted: 13th Mar 2006 20:28 Edited at: 13th Mar 2006 20:28
You would need to get the coordinates of mouse into 3d (translate), witch can be difficult, i suggest this :

Make cube (the example of yours) witch will be moved with mouseclick,

Make another cube about the size of mouse (small), and make the "other" cube allways move with mouse (and dont forget to use"hide object"for this cube), and use collision check to see if mouseclick()=1 and object collision(1,2)>0 or something similliar.

Currently working on (trying) making a new 3d engine for/within dark basic classic out of basic 2d commands, with vertex edit supported.
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 13th Mar 2006 20:32
ok i will resaerch some more.

Check out my site!(unfinished)
http://www.freewebs.com/dbnewbie/
nojbox87
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: England
Posted: 13th Mar 2006 23:15
try checking the codebase i have seen examples of this kind of thing before

I am a Christian and I know that God loves me. That is what makes my life so great!
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 13th Mar 2006 23:50
ok i will check there.

Check out my site!(unfinished)
http://www.freewebs.com/dbnewbie/
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 14th Mar 2006 01:10
i searched the codebase for object draging and draging but i didnt fiind anything.

Check out my site!(unfinished)
http://www.freewebs.com/dbnewbie/
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 14th Mar 2006 03:27
dodic is this what you ment buy haveing the muse as like a box i foun this code in the codebase.



Check out my site!(unfinished)
http://www.freewebs.com/dbnewbie/
nojbox87
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: England
Posted: 14th Mar 2006 09:57 Edited at: 14th Mar 2006 09:58
http://darkbasic.thegamecreators.com/?m=codebase_view_code&i=5b819e962c313e6ec482e89422b3c573

http://darkbasic.thegamecreators.com/?m=codebase_view&i=8f06669e4de85c627f61f9c4fa64f75a

http://darkbasic.thegamecreators.com/?m=codebase_view_code&i=b7b862b225560e467386d9b9922b3ee8

I would imagine something like those could be altered fairly easily i would think. Once it has detected the collisions (or click) then move the selectred object by the amount the mouse moves

I am a Christian and I know that God loves me. That is what makes my life so great!
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 14th Mar 2006 16:36
thank you nojbox i will look at the last to more closley becasu ei dont have the enhacment pack for DBC.

Check out my site!(unfinished)
http://www.freewebs.com/dbnewbie/
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 14th Mar 2006 20:01
ok im goin to use the code that i found.

how would i do some collision to move the cube when the mouse is on it.

Check out my site!(unfinished)
http://www.freewebs.com/dbnewbie/
nojbox87
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: England
Posted: 14th Mar 2006 20:06
ill have a look later when on other pc and try out that code. but im not very good with DB so no promises. hopefully someone else will be able to help

I am a Christian and I know that God loves me. That is what makes my life so great!
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 15th Mar 2006 02:22
ok thansk for trying.

Check out my site!(unfinished)
http://www.freewebs.com/dbnewbie/

Login to post a reply

Server time is: 2025-05-23 21:32:07
Your offset time is: 2025-05-23 21:32:07