Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/media/levels/presentation_physics.oxw @ 5376

Last change on this file since 5376 was 5376, checked in by rgrieder, 15 years ago

Added physics stuff demonstration file.

  • Property svn:eol-style set to native
File size: 3.7 KB
Line 
1<?lua
2  include("levels/hudtemplates3.oxw")
3  include("levels/spaceshiptemplates_presentation.oxw")
4  math.randomseed(344)
5?>
6
7<Level
8 name         = "Physics"
9 description  = "Just a few tests"
10>
11  <Scene
12   ambientlight = "0.8, 0.8, 0.8"
13   skybox       = "Orxonox/Starbox"
14   gravity      = "0, -10, 0"
15  >
16    <Light type=directional position="-100,50,50" direction="100, -50, -50" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
17
18    <StaticEntity
19     position        = "0,0,0"
20     name            = "floor"
21     collisionType   = "static"
22     friction        = 1
23    >
24      <attached>
25        <Model position="0,0,0" scale=100 mesh="plane.mesh" />
26        <Model position="0,-0.0001,0" roll=180 scale=100 mesh="plane.mesh" />
27      </attached>
28      <collisionShapes>
29        <PlaneCollisionShape planeNormal="0,1,0" planeOffset=0 />
30      </collisionShapes>
31        </StaticEntity>
32   
33        <MovableEntity
34     position        = "0,250,500"
35     rotationaxis    = "1, 1, 1"
36     rotationrate    = 360
37     velocity        = "0, 0, -80"
38     name            = "ship"
39     collisionType   = "dynamic"
40     friction        = 0.5
41     mass            = 500
42     restitution     = 0
43    >
44      <attached>
45        <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=4 mesh="assff.mesh" />
46        <BlinkingBillboard position="17,-1.5,0" material="Examples/Flare" colour="1.0, 0.5, 0.3" amplitude=0.1 frequency=0.5 quadratic=1 />
47        <BlinkingBillboard position="-17,-1.5,0" material="Examples/Flare" colour="0.5, 1.0, 0.3" amplitude=0.1 frequency=0.5 phase=180 quadratic=1 />
48       
49        <!--Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=4 mesh="assff.mesh" />
50        <Model position="0,0,0" scale3D="10, 3, 5" mesh="cube.mesh" />
51        <Model position="13,-1.3,0" scale3D="3, 1, 2" mesh="cube.mesh" />
52        <Model position="-13,-1.3,0" scale3D="3, 1, 2" mesh="cube.mesh" />
53        <Model position="0,0,7" scale3D="3, 2, 2" mesh="cube.mesh" />
54        <Model position="0,0.1,-11" scale3D="2.2, 1.8, 6" mesh="cube.mesh" />
55        <Model position="0,0.1,-19" scale3D="1.4, 1, 2" mesh="cube.mesh" /-->
56      </attached>
57      <collisionShapes>
58        <BoxCollisionShape position="0,0,0"      halfExtents="10, 3, 5" />
59        <BoxCollisionShape position="13,-1.3,0"  halfExtents="3, 1, 2" />
60        <BoxCollisionShape position="-13,-1.3,0" halfExtents="3, 1, 2" />
61        <BoxCollisionShape position="0,0,7"      halfExtents="3, 2, 2" />
62        <BoxCollisionShape position="0,0.1,-11"  halfExtents="2.2, 1.8, 6" />
63        <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
64      </collisionShapes>
65        </MovableEntity>
66   
67    <?lua
68    for i = -20, 20, 8
69    do
70      for i2 = -20, 20, 8
71      do
72        for i3 = -20, 20, 8
73        do ?>
74        <MovableEntity
75         position="<?lua print(i)?>, <?lua print(i3 + 250)?>, <?lua print(i2) ?>"
76         collisionType = "dynamic"
77         mass = 1
78         restitution = 0
79         friction = 0.5
80        >
81          <attached>
82            <Model position="0,0,0" scale=2 mesh="cube.mesh" />
83          </attached>
84          <collisionShapes>
85            <BoxCollisionShape halfExtents="2, 2, 2" />
86          </collisionShapes>
87        </MovableEntity>
88    <?lua
89        end
90      end
91    end
92    ?>
93
94    <ParticleSpawner position="-100,170,30" source="Orxonox/BigExplosion1part3" lifetime=2.0 loop=0 autostart=0>
95      <events>
96        <spawn>
97          <EventTrigger delay=1>
98            <events>
99              <trigger>
100                <SpawnPoint position="-100,170,30" spawnclass=SpaceShip pawndesign=spaceshipassff />
101              </trigger>
102            </events>
103          </EventTrigger>
104        </spawn>
105      </events>
106    </ParticleSpawner>
107  </Scene>
108</Level>
Note: See TracBrowser for help on using the repository browser.