Merge branch 'master' of github.com:Faerbit/swp

This commit is contained in:
Steffen Fündgens 2015-03-06 15:24:49 +01:00
commit b04185d720
19 changed files with 418 additions and 303 deletions

View File

@ -482,7 +482,7 @@
<object>
<modelPath>brazier.obj</modelPath>
<xOffset>0.0</xOffset>
<yOffset>0.5</yOffset>
<yOffset>0.35</yOffset>
<zOffset>0.0</zOffset>
<xRot>0.0</xRot>
<yRot>0.0</yRot>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

View File

@ -1,3 +1,123 @@
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-6.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>54.500000</zPos>
<idGreen>0</idGreen>
<idBlue>231</idBlue>
<typeID>245</typeID>
<trigger>
<name>-</name>
<undo>false</undo>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-6.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>26.500000</zPos>
<idGreen>0</idGreen>
<idBlue>226</idBlue>
<typeID>245</typeID>
<trigger>
<name>-</name>
<undo>false</undo>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-53.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>54.500000</zPos>
<idGreen>0</idGreen>
<idBlue>225</idBlue>
<typeID>245</typeID>
<trigger>
<name>-</name>
<undo>false</undo>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-53.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>26.500000</zPos>
<idGreen>0</idGreen>
<idBlue>141</idBlue>
<typeID>245</typeID>
<trigger>
<name>-</name>
<undo>false</undo>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
@ -27,122 +147,6 @@
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-6.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>54.500000</zPos>
<idGreen>0</idGreen>
<idBlue>140</idBlue>
<typeID>81</typeID>
<trigger>
<name>-</name>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-6.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>26.500000</zPos>
<idGreen>0</idGreen>
<idBlue>139</idBlue>
<typeID>81</typeID>
<trigger>
<name>-</name>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-53.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>54.500000</zPos>
<idGreen>0</idGreen>
<idBlue>138</idBlue>
<typeID>81</typeID>
<trigger>
<name>-</name>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-53.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>26.500000</zPos>
<idGreen>0</idGreen>
<idBlue>137</idBlue>
<typeID>81</typeID>
<trigger>
<name>-</name>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>

View File

@ -1,3 +1,153 @@
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-217.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>210.500000</zPos>
<idGreen>0</idGreen>
<idBlue>137</idBlue>
<typeID>245</typeID>
<trigger>
<name>-</name>
<undo>false</undo>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-6.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>54.500000</zPos>
<idGreen>0</idGreen>
<idBlue>231</idBlue>
<typeID>245</typeID>
<trigger>
<name>-</name>
<undo>false</undo>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-6.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>26.500000</zPos>
<idGreen>0</idGreen>
<idBlue>226</idBlue>
<typeID>245</typeID>
<trigger>
<name>-</name>
<undo>false</undo>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-53.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>54.500000</zPos>
<idGreen>0</idGreen>
<idBlue>225</idBlue>
<typeID>245</typeID>
<trigger>
<name>-</name>
<undo>false</undo>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-53.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>26.500000</zPos>
<idGreen>0</idGreen>
<idBlue>141</idBlue>
<typeID>245</typeID>
<trigger>
<name>-</name>
<undo>false</undo>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
@ -8,124 +158,8 @@
<yOffset>0.0</yOffset>
<zPos>216.500000</zPos>
<idGreen>0</idGreen>
<idBlue>141</idBlue>
<typeID>150</typeID>
<trigger>
<name>-</name>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-6.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>54.500000</zPos>
<idGreen>0</idGreen>
<idBlue>140</idBlue>
<typeID>81</typeID>
<trigger>
<name>-</name>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-6.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>26.500000</zPos>
<idGreen>0</idGreen>
<idBlue>139</idBlue>
<typeID>81</typeID>
<trigger>
<name>-</name>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-53.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>54.500000</zPos>
<idGreen>0</idGreen>
<idBlue>138</idBlue>
<typeID>81</typeID>
<trigger>
<name>-</name>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>
<scale>1.0</scale>
<xRot>0.0</xRot>
<yRot>0.0</yRot>
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-53.500000</xPos>
<yOffset>0.0</yOffset>
<zPos>26.500000</zPos>
<idGreen>0</idGreen>
<idBlue>137</idBlue>
<typeID>81</typeID>
<idBlue>142</idBlue>
<typeID>250</typeID>
<trigger>
<name>-</name>
<xPosition>0</xPosition>
@ -866,7 +900,7 @@
<zPosition>51.5</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>0.2</distance>
<distance>0.1</distance>
<isBiggerThan>true</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>openSecondDoor1.lua</luaScript>
@ -882,7 +916,7 @@
<zPosition>51.5</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>0.2</distance>
<distance>0.1</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>openSecondDoor1.lua</luaScript>
@ -919,7 +953,7 @@
<zPosition>29.5</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>0.2</distance>
<distance>0.1</distance>
<isBiggerThan>true</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>openSecondDoor3.lua</luaScript>
@ -935,7 +969,7 @@
<zPosition>29.5</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>0.2</distance>
<distance>0.1</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>openSecondDoor3.lua</luaScript>
@ -2596,7 +2630,7 @@
<zPosition>51.5</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>0.2</distance>
<distance>0.1</distance>
<isBiggerThan>true</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>openSecondDoor4.lua</luaScript>
@ -2612,7 +2646,7 @@
<zPosition>51.5</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>0.2</distance>
<distance>0.1</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>openSecondDoor4.lua</luaScript>
@ -2678,7 +2712,7 @@
<zPosition>29.5</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>0.2</distance>
<distance>0.1</distance>
<isBiggerThan>true</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>openSecondDoor2.lua</luaScript>
@ -2694,7 +2728,7 @@
<zPosition>29.5</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>0.2</distance>
<distance>0.1</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>openSecondDoor2.lua</luaScript>
@ -3891,7 +3925,7 @@
<zPosition>67.5</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>0.2</distance>
<distance>0.1</distance>
<isBiggerThan>true</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>openThirdDoor.lua</luaScript>
@ -3907,7 +3941,7 @@
<zPosition>67.5</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>0.2</distance>
<distance>0.1</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>openThirdDoor.lua</luaScript>
@ -6380,7 +6414,7 @@
<zPosition>159.5</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>0.2</distance>
<distance>0.1</distance>
<isBiggerThan>true</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>openFirstDoor.lua</luaScript>
@ -6396,7 +6430,7 @@
<zPosition>159.5</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>0.2</distance>
<distance>0.1</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>openFirstDoor.lua</luaScript>
@ -6413,7 +6447,7 @@
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>17.500000</xPos>
<yOffset>0.0</yOffset>
<yOffset>5.0</yOffset>
<zPos>81.500000</zPos>
<idGreen>1</idGreen>
<idBlue>94</idBlue>
@ -8798,7 +8832,7 @@
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-81.500000</xPos>
<yOffset>0.0</yOffset>
<yOffset>5.0</yOffset>
<zPos>4.500000</zPos>
<idGreen>1</idGreen>
<idBlue>8</idBlue>
@ -10748,7 +10782,7 @@
<zRot>0.0</zRot>
<manualPos>false</manualPos>
<xPos>-172.500000</xPos>
<yOffset>0.0</yOffset>
<yOffset>5.0</yOffset>
<zPos>58.500000</zPos>
<idGreen>0</idGreen>
<idBlue>178</idBlue>
@ -11921,18 +11955,51 @@
<idBlue>105</idBlue>
<typeID>20</typeID>
<trigger>
<name>-</name>
<name>resetPlayer</name>
<undo>false</undo>
<xPosition>0</xPosition>
<yPosition>0</yPosition>
<yPosition>-100000</yPosition>
<zPosition>0</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>1.0</distance>
<distance>100015</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>-</luaScript>
<luaScript>resetPlayer.lua</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>0</toChangeIdBlue>
<toChangeIdBlue>105</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
<trigger>
<name>sunStart</name>
<undo>false</undo>
<xPosition>-216</xPosition>
<yPosition>20</yPosition>
<zPosition>34</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>10</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>sunStart.lua</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>105</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
<trigger>
<name>sunUpdate</name>
<undo>false</undo>
<xPosition>-216</xPosition>
<yPosition>20</yPosition>
<zPosition>34</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>10</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>sunUpdate.lua</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>105</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
@ -12114,12 +12181,14 @@
</terrain>
<skydome>
<texture>skydome.png</texture>
<model>skydome.obj</model>
<texture>skydomeNew.png</texture>
<nightTexture>nightskydome.png</nightTexture>
</skydome>
<physics>
<friction>0.9</friction>
<strength>100.0</strength>
<strength>200.0</strength>
</physics>
<positionConstraint>

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 KiB

Binary file not shown.

View File

@ -71,7 +71,7 @@ void Level::update(float runTimeSinceLastUpdate, float runTime, glm::vec2 mouseD
mouseDelta.x=mouseDelta.y=0;
}
int runs = 2;
int runs = 4;
if(i>=20)
{

View File

@ -24,47 +24,79 @@ void Physics::init(std::string geometryPath) //prepares bullet by creating all i
void Physics::takeUpdateStep(float timeDiff)
{
counter++;
if(counter<1)
if(simulationActive)
{
world->stepSimulation(timeDiff); //allows the world to be simmulated correctly indipendant of the timedifferences between frames
return;
}
for(unsigned i = 0; i < allPositionConstraints.size();i++) //this handles the spring constraints
{
if(allPositionConstraints[i].position != allPositionConstraints[i].body->getCenterOfMassPosition()) //if constraint != position of the body because otherwise dir = 0
counter++;
if(counter<1)
{
btVector3 dir = allPositionConstraints[i].position - allPositionConstraints[i].body->getCenterOfMassPosition();
dir = dir*allPositionConstraints[i].strength - allPositionConstraints[i].body->getLinearVelocity()
*allPositionConstraints[i].body->getLinearVelocity().length();
allPositionConstraints[i].body->applyCentralForce(dir*allPositionConstraints[i].strength); //apply a foce upon the object pushing it towards the constraint position
world->stepSimulation(timeDiff); //allows the world to be simmulated correctly indipendant of the timedifferences between frames
return;
}
for(unsigned i = 0; i < allPositionConstraints.size();i++) //this handles the spring constraints
{
if(allPositionConstraints[i].position != allPositionConstraints[i].body->getCenterOfMassPosition()) //if constraint != position of the body because otherwise dir = 0
{
btVector3 dir = allPositionConstraints[i].position - allPositionConstraints[i].body->getCenterOfMassPosition();
dir = dir*allPositionConstraints[i].strength - allPositionConstraints[i].body->getLinearVelocity()
*allPositionConstraints[i].body->getLinearVelocity().length();
allPositionConstraints[i].body->applyCentralForce(dir*allPositionConstraints[i].strength); //apply a foce upon the object pushing it towards the constraint position
}
}
btVector3 position = cameraBody->getCenterOfMassPosition() - playerBall->getCenterOfMassPosition(); //gets a vector from the player to the camera
position = currentDirection;
position.normalize();
position *= cameraDistance;
position += playerBall->getCenterOfMassPosition(); //is the position cameraDistance away from the player in the direction of the camera
//prevent the camera from being dragged along on the ground
btVector3 dir = cameraBody->getCenterOfMassPosition() - position;
float str = 50 * dir.length() / cameraBody->getInvMass(); //getInvMass() returns the inverted mass
cameraBody->setLinearVelocity(btVector3(0,0,0));
cameraBody->applyCentralForce(-dir*str*10) ; //scale the force by camera mass
counter=0;
float speed = cameraBody->getLinearVelocity().length();
if(speed>20.0f)
{
position = cameraBody->getLinearVelocity();
position.normalize();
cameraBody->setLinearVelocity(position*20);
}
world->stepSimulation(timeDiff);
}
else
{
if(sinking)
{
btVector3 currentPos = playerBall->getCenterOfMassPosition();
currentPos -= btVector3(0,0.003f,0);
playerBall->setCenterOfMassTransform(btTransform(playerBall->getOrientation(),currentPos));
if(playerBall->getCenterOfMassPosition().y() < resetHight - 3)
{
playerBall->setCenterOfMassTransform(btTransform(btQuaternion(0,0,0,1),btVector3(startPosition.x(),startPosition.y() - 3,startPosition.z())));
playerBall->setLinearVelocity(btVector3(0,0,0));
playerBall->setAngularVelocity(btVector3(0,0,0));
forceMoveCamera(startPosition + btVector3(currentDirection.x()*cameraDistance,currentDirection.y()*cameraDistance,currentDirection.z()*cameraDistance));
sinking = false;
}
}
else
{
btVector3 currentPos = playerBall->getCenterOfMassPosition();
currentPos += btVector3(0,0.009f,0);
playerBall->setCenterOfMassTransform(btTransform(playerBall->getOrientation(),currentPos));
if(playerBall->getCenterOfMassPosition().y() >= startPosition.y() + 1)
{
sinking = true;
simulationActive = true;
}
}
}
btVector3 position = cameraBody->getCenterOfMassPosition() - playerBall->getCenterOfMassPosition(); //gets a vector from the player to the camera
position = currentDirection;
position.normalize();
position *= cameraDistance;
position += playerBall->getCenterOfMassPosition(); //is the position cameraDistance away from the player in the direction of the camera
//prevent the camera from being dragged along on the ground
btVector3 dir = cameraBody->getCenterOfMassPosition() - position;
float str = 50 * dir.length() / cameraBody->getInvMass(); //getInvMass() returns the inverted mass
cameraBody->setLinearVelocity(btVector3(0,0,0));
cameraBody->applyCentralForce(-dir*str*10) ; //scale the force by camera mass
counter=0;
float speed = cameraBody->getLinearVelocity().length();
if(speed>20.0f)
{
position = cameraBody->getLinearVelocity();
position.normalize();
cameraBody->setLinearVelocity(position*20);
}
world->stepSimulation(timeDiff);
}
void Physics::removePositionConstraint(int bodyIndice) //remover function for deleting all pos constraints on one body
@ -105,6 +137,8 @@ void Physics::addPlayer(float friction, float rad, Entity entity, float mass, fl
btDefaultMotionState* motion = new btDefaultMotionState(btTransform(btQuaternion(glmQuat.x,glmQuat.y,glmQuat.z,glmQuat.w),btVector3(entity.getPosition().x,entity.getPosition().y,entity.getPosition().z))); //next we define the motionstate, wich describes the innital position and rotation
startPosition =btVector3(entity.getPosition().x,entity.getPosition().y,entity.getPosition().z);
btRigidBody::btRigidBodyConstructionInfo info(mass,motion,sphere,inertia); //next we process all data for the rigid body into info
info.m_friction = friction*2; //here we modify the friction and restitution (bounciness) of the object
@ -144,7 +178,7 @@ void Physics::addTerrain(int width, int length, float** heightData) //The terrai
btHeightfieldTerrainShape* terrainShape = new btHeightfieldTerrainShape(length,width,heightfield,highest,1,true,false);
btRigidBody::btRigidBodyConstructionInfo info(0,new btDefaultMotionState(),terrainShape,btVector3(0,0,0)); //next we process all data for the rigid body into info
info.m_friction = 1;
info.m_friction = 0.8f;
info.m_restitution = 0;
btRigidBody* tBody = new btRigidBody(info);
@ -436,7 +470,7 @@ bool Physics::playerWithObject()
void Physics::addCamera() //Camera Creator automatically called when player is created
{
btSphereShape* sphere = new btSphereShape(0.2f); //we use this to make a more interesting camera, that does not interpenetrate with the terrain/objects
btSphereShape* sphere = new btSphereShape(0.5f); //we use this to make a more interesting camera, that does not interpenetrate with the terrain/objects
btVector3 inertia(0,0,0); //rotation handled elsewhere (as it always has to look at the player)
@ -578,18 +612,22 @@ void Physics::forceMove(glm::vec3 newPosition, unsigned indice)//ugly, but neede
{
bodies[indice]->setCenterOfMassTransform(btTransform(btQuaternion(0,0,0,1),btVector3(newPosition.x,newPosition.y,newPosition.z)));
bodies[indice]->setLinearVelocity(btVector3(0,0,0));
bodies[indice]->setAngularVelocity(btVector3(0,0,0));
}
void Physics::forcePlayer(glm::vec3 newPosition)//ugly, but needed for reset
{
playerBall->setCenterOfMassTransform(btTransform(btQuaternion(0,0,0,1),btVector3(newPosition.x,newPosition.y,newPosition.z)));
playerBall->setLinearVelocity(btVector3(0,0,0));
forceMoveCamera(newPosition + glm::vec3(currentDirection.x()*cameraDistance,currentDirection.y()*cameraDistance,currentDirection.z()*cameraDistance));
if(!simulationActive)
return;
simulationActive = false;
resetHight = playerBall->getCenterOfMassPosition().y();
startPosition = btVector3(newPosition.x,newPosition.y,newPosition.z);
}
void Physics::forceMoveCamera(glm::vec3 newPosition)
void Physics::forceMoveCamera(btVector3 newPosition)
{
cameraBody->setCenterOfMassTransform(btTransform(btQuaternion(0,0,0,1),btVector3(newPosition.x,newPosition.y,newPosition.z)));
cameraBody->setCenterOfMassTransform(btTransform(btQuaternion(0,0,0,1),newPosition));
}
void Physics::kill() //delete dynamically allocated memory

View File

@ -72,7 +72,7 @@ class Physics {
void kill();
void addButtonFrame(Entity entity);
void forceMove(glm::vec3 newPosition, unsigned indice);
void forceMoveCamera(glm::vec3 newPosition);
void forceMoveCamera(btVector3 newPosition);
void addConvexBody(Entity entity, std::string path, float mass, float dampningL, float dampningA, unsigned indice, float scaling, bool rotate);
void prepareCollisionDetection();
bool playerWithGround();
@ -82,6 +82,10 @@ class Physics {
struct positionConstraint{btRigidBody* body; float strength; btVector3 position;};
private:
btVector3 startPosition = btVector3(0,0,0);
float resetHight = 0;
bool simulationActive = true;
bool sinking = true;
btVector3 currentDirection = btVector3(1,1,1);
btRigidBody* playerBall; //allows for easier access to the ball
btRigidBody* terrainBody; //duh