Talk:CULL
SA Mirrors
Stub which should get to the article later - please correct me if I am wrong! I still need to do some tests.
San Andreas does support mirrors. They can be created using culling zones. In general a mirror is a zone where one of the box side planes is used to project the objects inside and outside the box reflected by this side plane. The projection view itself can be translated in the world, but only into the direction from the zone center the direction vector points. The Cm value descripes the position of the mirror plane into the direction the direction vector points. This vector is descriped by Vx, Vy and Vz. But it can only point along the axis. So there are 6 different possibilities for the vector:
- -1, 0, 0 – The plane along the negative x-axis is used for mirror projection
- 1, 0, 0 – The plane along the positive x-axis is used for mirror projection
- 0, -1, 0 – The plane along the negative y-axis is used for mirror projection
- 0, 1, 0 – The plane along the positive y-axis is used for mirror projection
- 0, 0, -1 – The plane along the negative z-axis is used for mirror projection
- 0, 0, 1 – The plane along the positive z-axis is used for mirror projection
(need to test things like [1, 1, 0]... but they should also work. The only thing impossible is to reflect an mirror inside an other on the other side - perhaps this is wanted since it may cause an endless recursion... just R* knows ^^)
Now Cm translates the view plane (which is just as large as the side plane of the cull zone used for reflection) to it's final position along the direction vector. Note that Cm is not relative to the zones center. It is an absolute value descriping the planes final position.