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 / Help Increasing The Height of a Matrix (Y Axis) - Disappears?

Author
Message
M22RDY
12
Years of Service
User Offline
Joined: 8th Oct 2011
Location: SC, UK
Posted: 24th Oct 2011 22:34
I have a floor matrix and I want to use another matrix for the ceiling. Using the below code works however, the matrix Y axis only goes to 190 anything higher just makes the matrix disappear.

Can anyone decipher this?



Murdy
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 25th Oct 2011 00:31
I think the problem here is that when the camera looks at the underside of a matrix, the underside is invisible to the camera.

The SET MATRIX command has an option for turning culling on or off (which I believe is the technical term for what I described above).

The below demo shows what I mean. Run it once, move the camera up and down and you see the matrix dispear when the camera goes below it. The unrem the SET MATRIX line (line 8) and run it again and you'll see that the matrix doesn't disapear.



I've never used the SET MATRIX command before so I'm not sure not how the values I've used in the other parameters will affect the look of the matrix in your game. You might have to play around with them to get it to look right.
M22RDY
12
Years of Service
User Offline
Joined: 8th Oct 2011
Location: SC, UK
Posted: 25th Oct 2011 01:02
Thank You Solved

Right on the money, I thought initially that I had to set the cull to 1 which it appears to be by default instead setting the cull to 0 which according to the help "the matrix will draw polygons normally hidden due to the direction the polygon faces"

... and they were definitely hidden. Could't figure this one out on my own.

Login to post a reply

Server time is: 2024-05-20 05:14:26
Your offset time is: 2024-05-20 05:14:26