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
Ultimate Newbie
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 21st Sep 2005 21:45
I'm trying to make a Doom/Quake clone out of the huge dungeons tutorial. Can someone explain the basics of 3d space. Every time I try to make a gun that appears at the bottom of the screen, or place monsters/dogs etc in the dungeons, they either don't appear at all, crash the program, or appear half way through a wall.
Truly mystified.
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 22nd Sep 2005 03:16
I can think of a few things that may be causing the problem.

1. You need to scale your objects to a larger size, use the scale object OBJECT NUMBER, X, Y, Z command.
2. You are positioning your objects too far away to see, or you're using autocam; so use autocam off.
3. If you're still experiencing problems from #1 and #2, point the camera at the object like this point camera object position x(OBJECT NUM), position y(OBJECT NUM), position z(OBJECT NUM)

Try those out and let me know what happens

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 23rd Sep 2005 03:40 Edited at: 23rd Sep 2005 03:49
Quote: "Can someone explain the basics of 3d space"


Imagine you are floating in space.

Where you are is called 0,0,0.

OK there are three imaginary lines running through your body. The first runs from left to right and goes into your right side, out of the left side and stretches off into infinity. It continues right into infinity also. This is called the X axis.

If you turn your head and look to the right, units increase the further you travel along this line. There are no centimetres or metres in this 3D space - only units (which can actually mean anything).

The reason for this is that measurement in a 3D world is relative to the size of the objects in that world. One tile of a matrix can be 1000 pixels square. If you make an object of size 1 unit, traversing that square would seem like a kilometre. However make that object of size 100 and the same sized tile would seem like a couple of metres.

If you now turn your head to look to the left, then the units decrease as you follow the line into the distance. If you remember that you are currently floating at 0,0,0 then the first zero is the X axis, so moving to the left DECREASES the value from zero making a negative number.

So if you start at 0,0,0 and are plced at -10,0,0 then your body will move 10 units left. Positioning your body at 10,0,0 will move it to 10 units right of 0,0,0.

OK, there's another imaginary line which runs from infinity directly in front of you, passes through your stomach, out of the middle of your back and off to infinity behind you. This is the Z axis.

With the Z axis, increasing the units will move you forwards in space and using negative numbers will move you backwards. In the 0,0,0 example, the LAST zero represents the Z axis, so 0,0,10 will move you 10 units forwards and 0,0,-10 will move you 10 units backwards.

* Note that the values 10 and -10 are literal values based on 0,0,0 being the centre of your world - they are NOT offsets. The value -10 moves you to position -10 on the X axis- It does NOT move you back 10 units from your current X position!

The last imaginary line is a vertical line which runs from infinity directly above your head, through the top of your head, down through the length of your body and out of your feet to infinity below you. This is the Y axis.

In the 0,0,0 example, the SECOND zero represents the Y axis.

Positive numbers along the Y axis like 0,10,0 will move you up 10 units, while negative numbers move you down. 0.-10,0 will move your body down 10 units.

Using these three values, you can position objects anywhere in 3D space.

When you use the Rotate commands, imagine these lines are running through the object in question but are metal rods. In your mind, see the object rotating on these rods like a chicken roasting on a spit - which incidentally would be the X axis.

Once you can imagine which rod the object is rotating on, you know which of the X, Y or Z rotate commands to use.

TDK_Man

Login to post a reply

Server time is: 2024-09-24 05:27:08
Your offset time is: 2024-09-24 05:27:08