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.

Dark GDK / pointing a 3d object for later use (ingame)

Author
Message
haliop
User Banned
Posted: 4th Sep 2008 08:03
hello again everyone
so as i said , i'm trying to build a MP game , but first i will need to build a level or a map editor for it, i want instead of using other 3d builders to build one of my own. that later if game succeds a 3rd user party can build a map.

now i know its a bad idea for a noob like me , but i'll go for it .
for now this is what i have done already , two days of work.

if you put the mouse over the build button it will create a new box which you need to place on the Grid.
i'm having a trouble , to get it the way i want, as for , i want the box to appear behind the Buildbutton , but it seems that the mouse cordinates are messed up for some how , so the newly created box appers in the other side of the screen. don't know why thats happening.

after i'll reach that point , the box will be able to be resaized and streached and whatever.. then textured.

so why does the Box dosen't appers behind the Mouse?
as in this code:

dbMakeObjectCube(NewBox,10);
dbPositionObject(NewBox,dbMouseX(),dbMouseY(),-5);

thats in a new VOID in the loop.
at the end after you hit Enter you can create a new box.

for now , you can play with the camera using arrows, and if you hit Space it will return to deafult position and angles.

ty for your time.





Attachments

Login to view attachments
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 9th Sep 2008 17:42 Edited at: 9th Sep 2008 17:46
void dbPositionObject ( int iObject, float fX, float fY, float fZ )
This uses 3 Dimension placement.
fX : is 3Dimentional WIDTH axis
fY : is 3Dimentional HIGHT axis
fZ : is 3Dimentional DEPTH axis
Depending upon what part of 3D space you are looking at with the camera will determine the exact area that your box will show up in.


dbMouseX() and dbMouseY()
These give just the screen X and Y positions and have nothing to do with 3Dimension space.

Login to post a reply

Server time is: 2024-09-30 05:30:40
Your offset time is: 2024-09-30 05:30:40