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 Clarifications

Author
Message
Social Disease
20
Years of Service
User Offline
Joined: 30th Sep 2003
Location: State of Confusion, beyond Denial...
Posted: 7th May 2004 00:31
Hello, I have some questions about Matricies. I've been doing some tinkering, but it dosn't all make sense yet.

When I make a matrix: make matrix 1,500,500,100,100
does it make it from the center? it seems to, but then if I use matrix position x(1), matrix position y(1), and Matrix position z(1) it seems to be from one corner.

Also whats with the help file on Set matrix height?
Quote: "
This command will set the individual height of a point within the matrix. To raise a whole grid square you
would need to raise four points, one from each corner of the square. If you set points x=0 z=0, x=0 z=1,
x=1 z=0 and x=1 z=1 to a value of 10, you would raise the near left square upwards by ten units. The
matrix number and tile reference values should be integer values. The height value should be a real number.

SYNTAX
SET MATRIX HEIGHT Matrix Number, TileX, TileZ, Height
"

Does it work by intercepts or by tiles? Very strange.

Think Gad fro Spill Chock!
GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 7th May 2004 06:52
Ok... Think of a matrix as a giant grid made of chicken wire... You can conform th chicken wire into any landscape (well... almost any) you want by raising each grid...

The set matrix height command works by intercepts... you can raise each intercept to whatever height you like... Set Matrix Tile works by tiles however...

The matrix is positioned from one corner... If you say "Position Matrix 1,0,0,0" the lower left corner will be positioned at the coodinants 0,0,0...When you first load your matrix it may look like it is centered at 0,0,0 but thats only because you have "Autocam On" which positions the camera at the center of the matrix when it is loaded. To fix this type "Autocam Off" near the top of your code...

...Well...I hope I helped...

Previously known as "Game_Creator". Thou shalt not thwart the way of the dragon. For thou tasteth like chicken.
Social Disease
20
Years of Service
User Offline
Joined: 30th Sep 2003
Location: State of Confusion, beyond Denial...
Posted: 10th May 2004 18:36
And if i create Primitive objects (cubes, spheres, so on...) Are they positioned by the center?

Make object Sphere 1, 100
position object 1,0,0,0

puts the sphere at 0,0,0 with 50 going up, down, left, right, forward, and backward? Is this right?

Think Gad fro Spill Chock!
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 10th May 2004 19:51
You are spot on!

Try this code to see visually.

The white square is 100 units along each side and its centre is at 0,0,0

The yellow sphere is created as a 100 unit sphere. The unit is the diameter of the sphere. This is as you say, a sphere with a radius of 50 and defaults its centre as 0,0,0.

You can of course then move the object whereever you like and rotate them to desired angle.



Boo!

Login to post a reply

Server time is: 2024-09-22 08:47:19
Your offset time is: 2024-09-22 08:47:19