Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/SuperOrxoBros_HS18/doc/api/groups/Portals.dox @ 12177

Last change on this file since 12177 was 12177, checked in by siramesh, 5 years ago

Super Orxo Bros Final (Sidharth Ramesh, Nisa Balta, Jeff Ren)

File size: 2.8 KB
Line 
1/**
2    @addtogroup Portals Portals
3    @ingroup Modules
4
5    This module allows you to place @ref orxonox::PortalEndPoint "PortalEndPoints" in space and connect pairs of them with a @ref orxonox::PortalLink "PortalLink" in order to allow fast travelling from A to B.
6
7    @section FastHowTo Fast HowTo: Including portals in a level
8    The simplest way to use portals is show by the following piece of xml-code
9    @code
10    <Template name=PortalDefault>
11        <PortalEndPoint>
12            <attached>
13                <Billboard material="Portals/Default" />
14            </attached>
15        </PortalEndPoint>
16    </Template>
17
18    <PortalEndPoint position="0,0,0" id="1" design="PortalDefault"/>
19    <PortalEndPoint position="-100,0,0" id="2" design="PortalDefault"/>
20    <PortalLink fromID="1" toID="2" />
21    @endcode
22    This
23     - creates two @ref orxonox::PortalEndPoint "PortalEndPoints", one at 0,0,0 and the other at -100,0,0
24     - makes them visible by attaching a Billboard made of the "Portals/Default" material to each of them and
25     - connects them, meaning that any @ref orxonox::Pawn "Pawn" which gets near 0,0,0 is immediately "warped" to -100,0,0 (but not the other way round)
26
27    @section IncludePortals Detailed HowTo: Including portals in a level
28    In the example above some default values are used. The full possibilities are shown below
29    @code
30    <Template name=PortalDefault>
31        <PortalEndPoint>
32            <attached>
33                <Billboard material="Portals/Default" />
34            </attached>
35        </PortalEndPoint>
36    </Template>
37
38    <Template name=PortalBig>
39        <PortalEndPoint>
40            <attached>
41                <Billboard material="Portals/Big" />
42            </attached>
43        </PortalEndPoint>
44    </Template>
45
46    <PortalEndPoint position="0,0,0" id="1" distance="40" target="MobileEntity" design="PortalDefault"/>
47    <PortalEndPoint position="-100,0,0" id="2" distance="40" target="MobileEntity" design="PortalBig"/>
48    <PortalLink fromID="1" toID="2" />
49    <PortalLink fromID="2" toID="1" />
50    @endcode
51
52    step by step
53    @subsection Templates "Templates"
54    In order to make @ref orxonox::PortalEndPoint "PortalEndPoints" visible in the game there must be something visible.
55    The idea (as shown above) is to define or include arbitrary Templates which make a PortalEndPoint visible and use them later by setting the design attribute of a @ref orxonox::PortalEndPoint "PortalEndPoint" to the template name
56    @subsection Parameters "Parameters"
57     - position: 3d-coordinate in space
58     - distance (default: 50): distance at which a valid entity gets pulled in (if the end point is an entrance).
59     - target (default: "Pawn"): the class which is able to enter this end point (if it is an entrance)
60     - design: the name of the @ref orxonox::Template "design template"
61*/
Note: See TracBrowser for help on using the repository browser.