Remote portals

From C4 Engine Wiki

Jump to: navigation, search

These are the steps to get a remote portal working.

1) In the destination zone, create a location marker (round blue marker with arrow) that represents the position and direction of what you see through the portal. In the Get Info box, give it a unique four-letter identifier. The identifier 'port' used in the demo is just an arbitrary name -- you can use whatever you like.

2) In the zone that will contain the portal, draw a remote portal covering the total area that you'll be able to see through. In the Get Info box for the portal, select "Uses oblique view frustum" and leave the portal's buffer set to Primary. In the "Remote location type" box, enter the same four-letter code that you used for the marker in step 1.

3) Connect the portal to the destination zone using the Select and Connect tool. If the destination zone is the infinite zone (like it is in the demo), then select the portal, click on the ZONE connector, and choose "Connect to root zone" from the Node menu.

4) In the plane of the portal, place a position marker (plus-like blue marker) at the center of the portal and give it the type 'cent' in the Get Info box. This tells the engine how to align the portal with the destination marker.

5) Create a new material having a diffuse color with alpha less than 255. The alpha value will control how much light gets through the portal and how much is reflected from the portal surface.

6) With this new material selected, draw some kind of geometry over the portal (like a disk or plate). In the Get Info box, check "Geometry covers a remote portal" under the Rendering pane. You'll probably want to disbale shadows for it, too. If you want to be able to fire/jump through the portal, then select the Teleport controller under the Controller pane for the geometry.

7) Select the portal, the center marker, and the covering geometry, and group them together with Ctrl-G. You should see a green bounding sphere for the new group.

8) In the controller tab of the remote portal using get info, select Teleport

Personal tools