First I assume you are using the Pro version.
Are these mirrors on the floor or the wall.
The mirror code from office is for a floor mirror.
There's code for a vertical mirror in Aum9
Thank George for this
code:
Q: I need some code for a vertical mirror - can you help?
A: First of all make sure that your mirror entity won't be rotated in the level (give it the correct angles when you create it) . Here's some code for a vertical mirror that is placed on the south, with its reflective surface towards north:
function init_vmirror(); // put init_vmirror(); in main
view vmirror {};
function init_vmirror()
{
camera.portal = vmirror;
vmirror.noshadow = on; // suppress shadows in the mirror
vmirror.noparticle = on; // suppress particles in the mirror
vmirror.portalclip = on; // clip at portal plane
while (1)
{
proc_late(); // place it at the end of the function list
vmirror.genius = camera.genius;
vmirror.aspect = camera.aspect;
vmirror.arc = -camera.arc;
vmirror.fog = camera.fog;
vmirror.x = camera.x;
vmirror.y = 2 * camera.portal_y - camera.y;
vmirror.z = camera.z;
vmirror.pan = -camera.pan;
vmirror.tilt = camera.tilt;
vmirror.roll = camera.roll;
wait(1);
}
}
Ken