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 / Matrix problems

Author
Message
Resident Evil 4 fanboy
19
Years of Service
User Offline
Joined: 2nd Feb 2005
Location: Where evil doers are!Oh wait, my room!
Posted: 11th Aug 2005 01:33
When wrote this code

I see some of the matrix not all and the object at the same time, please help me!



I'll be waiting for you on halo 2 with a magnum and shotgun in hand!

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 11th Aug 2005 02:53
set camera range 1,9999999
make matrix 1,10000,10000,70,70
wait key
delete matrix 1
make object sphere 2,1
wait key

"Well if she dies it'll teach her not to do it again..." - Me
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Aug 2005 03:21
Also take a look at:

AutoCam Off

for your program and resize image in Paintshop Pro for your sig. (800x600 is a bit on the large size)...

TDK_Man
Resident Evil 4 fanboy
19
Years of Service
User Offline
Joined: 2nd Feb 2005
Location: Where evil doers are!Oh wait, my room!
Posted: 11th Aug 2005 03:48
I want the matrix still there

I'll be waiting for you on halo 2 with a magnum and shotgun in hand!

master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 11th Aug 2005 06:59
My only advice to use the autocam off command like TDK said, texture the matrix and positon the camera somewhere. For example:

I know for a fact that code works, provided you have a texture named "image.bmp", or you can change the texture image around a bit. That matrix is the exact size as one of the arenas in the game I'm making.

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Aug 2005 07:24
You have to remember that when anything in DB is created, it is placed at 0,0,0 in 3D space - including your matrix.

In the case of matrices, it's the bottom left corner (looking down on it from above) that's at 0,0,0. Reposition your objects, but don't move the matrix unless you really, really have to, as Get Ground Height() doesn't work without extra maths to calculate the offset distance you moved it.

If AutoCam is on, then the camera will automatically point at your objects as they are being created. We don't want this, so use AutoCam Off to prevent it.

So, position your object say in the centre of the matrix with:

Position Object ObjNum, MatrixWidth/2, 10, MatrixHeight/2

(The 10 is used to place it just above the matrix so it isn't half hidden).

Next, position and point the camera at the object with:

Position Camera MatrixWidth/2, 30, MatrixHeight/2-20
Point Camera MatrixWidth/2, 10, MatrixHeight/2

This will put the camera 'south' of the object, slightly above it and looking down at it.

Once you can see the object you can play around with the distance values until you get accustomed to the distances...

TDK_Man

Login to post a reply

Server time is: 2024-09-24 01:34:17
Your offset time is: 2024-09-24 01:34:17