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.

Newcomers DBPro Corner / 3D, How do you code it?

Author
Message
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 25th Oct 2004 07:57
I have been experimenting with 3D but I have been wondering how people put different objects in a 3D enviroment. When I have tried it I couldn't even move objects to the place I wanted. So what I am asking is "What are some easy ways to code 3D?" Examples of this might be how someone would place objects along the x,y,z axises, and so on. I am pretty much lost with 3D coding.


Join the group
Antdizzle
20
Years of Service
User Offline
Joined: 6th Mar 2004
Location: Las Vegas
Posted: 25th Oct 2004 08:02
Try making a matrix first so you can see where the ground is first. Then you need to make a camera so you can move around. And then you could put some spheres on the matrix. Check out the Monster Hunt tutorial for more information.
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 26th Oct 2004 04:08
Heya 1tg46,
I case you found antdizzles suggesions a little heavy for you (they would of been for me when i first started) then have a look at the code attached to this thread.
it is the very basic first steps of coding 3D, it is basically what antdizzle suggested.
It is aimed at the complete beginner so if it that is not you, im sorry i didnt mean to offend you or anything.
But anyway have a look, i hope it helps
Good Luck
Baggers
Saido
20
Years of Service
User Offline
Joined: 16th Oct 2004
Location: The Netherlands
Posted: 26th Oct 2004 04:19
Wich code ? i would like to see it too

1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 26th Oct 2004 09:39
The code is attached to the post lower right hand corner of Baggers post.

More suggestions are welcome Thanks to those of you so far.


Join the group
Soy Cocktail
20
Years of Service
User Offline
Joined: 23rd Dec 2003
Location:
Posted: 26th Oct 2004 13:07
when I am placing 3d objects I normally create a function to allow me to move the object and also print the cords of the object. I would normally use "wasd" for moving the object and the arrow keys to move the camera. once I like where it is I record the position and use it the hard code the object position. If you need help creating a function to move your object and print the cordinates to the screen I would be glad to help.

Aku Soku Zan
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 26th Oct 2004 15:17
Post it up, it can but help !
i had one of these commands once, still has it's use no-matter how good you become at visualising scenes. (unless you develop the idea and make a world edior...might be my next project !)
Baggers
Soy Cocktail
20
Years of Service
User Offline
Joined: 23rd Dec 2003
Location:
Posted: 26th Oct 2004 16:53 Edited at: 26th Oct 2004 16:54
I use DBPro therefore my code is tested and works for dbpro and I have no idea if it will work for Db or not.

For movement of the object I use this function

You will need to declare obj_ang# as global or else the object will not rotate.

For printing the information of the object I use this function


For moving the camera I use this function

You will need to declare cameraheight# and cam_ang# as global

This works when getting the correct x and z position for the object when the object dosen't need to be moved up or down. If needed I can modify my functions to do so.

Aku Soku Zan

Login to post a reply

Server time is: 2024-11-27 12:39:05
Your offset time is: 2024-11-27 12:39:05