Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,466 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
mirror as Duke Nukem 3D #262318
04/23/09 04:49
04/23/09 04:49
Joined: Jun 2008
Posts: 21
A
Ahlallouch Offline OP
Newbie
Ahlallouch  Offline OP
Newbie
A

Joined: Jun 2008
Posts: 21
Hello

I try to construct a mirror of bathrooms as that of games Duke Nukem 3D of 1997

Thanks

Re: mirror as Duke Nukem 3D [Re: Ahlallouch] #262332
04/23/09 06:29
04/23/09 06:29
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
See Aum82:
Originally Posted By: Aum82
A: Use the code below and these tips:

1) The mirror entity shouldn't be rotated at all; create it and place it in the level using the same orientation.

2) The mirror entity should have its faces set to "flat", excepting the reflecting face, which should be set to "mirror".

3) The mirror code changes depending on the orientation of the mirror entity; my example allows you to place a mirror on the southern wall in Wed's top view.

4) The back of the mirror should have enough empty space; what you see in the mirror is actually created behind the mirror.

5) The level blocks faces that act as a frame for the mirror should be set to none.


Code:
VIEW* mirror = 
{
       layer = 10;
} 

function mirror_startup() 
{ 
       while (!player) {wait (1);}
       camera.portal = mirror; 
       set (mirror, NOSHADOW); // suppress shadows in the mirror 
       set (mirror, NOPARTICLE); // suppress particles in the mirror 
       set (mirror, PORTALCLIP); // clip at portal plane 
       while (1) 
       { 
               proc_kill(4);
               mirror.genius = camera.genius; 
               mirror.aspect = camera.aspect; 
               mirror.arc = -camera.arc; 
               mirror.x = camera.x; 
               mirror.y = camera.portal_y - (abs(camera.portal_y - camera.y)); 
               mirror.z = camera.z; 
               mirror.pan = -camera.pan; 
               mirror.tilt = camera.tilt; 
               mirror.roll = camera.roll; 
               wait(1); 
       } 
}



Moderated by  Blink, Hummel, Superku 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1