So in order to fit the background to the viewport and cover some camera movements, I only have to make a bigger CorneriaMesh?
Code: Select all
<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="App" Caption="ZGameEditor application" ScreenMode="0" CameraPosition="-1.8277 -0.8122 10" RenderOrder="1" FileVersion="2">
<OnLoaded>
<ZExpression>
<Expression>
<![CDATA[//
for(int i=0; i<4; i++)
{
Box.Position.X = random(0, 4);
Box.Position.Y = random(0, 4);
Box.Position.Z = random(-10, 8);
Box.Rotation.X = rnd();
Box.Rotation.Y = rnd();
Box.RotationVelocity.X = random(0, 0.125);
Box.RotationVelocity.Y = random(0, 0.125);
createModel(Box);
}]]>
</Expression>
</ZExpression>
<Variable Name="GameTime"/>
</OnLoaded>
<OnUpdate>
<ZExpression>
<Expression>
<![CDATA[GameTime += App.DeltaTime;
App.CameraPosition.X = cos(GameTime/2)*2;
App.CameraPosition.Y = sin(GameTime/2)*2;]]>
</Expression>
</ZExpression>
</OnUpdate>
<OnRender>
<UseMaterial Material="CorneriaMaterial"/>
<RenderMesh Mesh="CorneriaMesh"/>
</OnRender>
<Content>
<Mesh Name="CorneriaMesh">
<Producers>
<MeshBox Scale="20 10 1" Grid2DOnly="255"/>
</Producers>
</Mesh>
<Bitmap Name="CorneriaBitmap" Width="512" Height="512" Filter="1">
<Producers>
<BitmapFromFile DataWidth="512" DataHeight="512">
<BitmapFile>
<![CDATA[78DAEDDD2B731B491706E0BFB170E107030303030D03050307060A060A1A0A061A060606FA277DB3EE55EFD1E99ED1C8D62DF2A37ACAA5CB68A6FB3DAA6AF55CE4BFBE7CFC0B00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000E014FE5E7D020000000000000000000000000000000000000000CEE47F5F3F03000000000000000000000000000000000017F661780000000000000000000000000000006EC4C76F5F0000000000000000000000000000801BF169BD0200000000000000000000006EDCE7EF5F0100000000000000803FD4C366000000000000EECC97C76F00000000DCB1D5E37700DEA1AF8F8F00BC43C3760BC03BF4EDC70F00DEA1F5D31300EF9019100000000000000000000000000000DCB7F5F6E98EDBFCEADE5D2C16F9CB5FFEF27FCB1BC785E3F2ED7BA7D6D65D72C9A6CB6207DF7E6CF7A75618573BD5C257F76561D7E42F7FF9CBFFA6F28FCD3BAA616943F199A336DA6D467972FBF4EBD8B1B2DBD4713DA3D4E6B61CE9BDE58DC77E98EBBB8E2D96FCE52F7FF95F3EFFB89599F1AB9B5EEDDAC122CE57A1B63936BEDBFD6E56EDE724AD39869F1A3CD585EE924BBA237FF9CB5FFEB79F7FBBF5F6BD532D2C4F3EBFDCEAABB1B3CBF3FFF9FBB9ACADBCBDAEA43CDF4DA61DB8DB11B6AE705C4F1B75DDE2F86A6A407C75AA58DDBEA4B7C85FFEF297FF6DE6DF5DBEDB8B944359AC865F4B90D26BB7183B959E8F09C4DC8A34B74AE14FA5D4CD36BDD4155FEDE639F3294D733DF9CB5FFEF2BF9DFC6BF7DBF1A876392550E28D393FF76EDD012BD531F528C6D596A06EA80CA0F193D0D634F6A8A617DB167B515EAACBC425EB02A97631A8FA52B78F69BAD7D64EFEF297BFFCAF927FDCAFD50E8871B02B6B2BB7F23045DD861F07E26EC26DBFBAD589CFC7FCE3305A57D5DD4A6C7CAA450AF9E0701CFB38F59DA4FD2630755049FEF297BFFCAF98FFD4E4AB96A676AADC29F9B7258B694CCDC5DAB1B55B82EE6A8BFA01688FCECF6495EE4F7D6788F9778B355582EEF1A9B40333BD94DE257FF9CB5FFE97CC7F26C66E1FE3F27186D54637351D8B6368BB9BAB3DEC923A5877F7D5EF006973719218B3EA0EB8074BD0AD66BCDF9E121077B8B58DEF9E9F267FF9CB5FFE97CFBF3D523C35692A4BC6DD6533D3AE6EFE71F4ECEEDA4ABBE3DAE94C9AB0742768DDB95577FE35559176BF5F77F9B6C1ED7CB6FDAAD3F648FEF297BFFCAF927F77FC4D73B158A3B4936AA1B4A1A95E77D73CF38149C59A0AAA5B82F92A84C6F4A772ED189D4E5A2BCF2CBC5C45FEF297BFFCAF927F3B7F99996ACD8F53F3D1CDE7DFAE3095238ED1ED2CB27B9CA57B6C254ECDEABBE6BF12B423EFFCCEC3DACDEE54B78D57FEF297BFFCAF927F3C19A93B292B1B7DD8FE2C0ECE56BA5578B9FF3C558234FF8AB3B9144277BC6BCF955DBE63AD8EB0690A39B3E72DADA77BBE59FD54CC5C8A2E7FF9CB5FFED7CD3FED768B752923480CBF6AC7E2D2AAF252B913179E394013334FF977939C3A39EAE07196927637BAB4FEA951B8FD863075CAF1D485EAED1DF9CB5FFEF2BF4AFE29FCF16F79B53E6C936FC5A6CE2CD62D413B0F9A39396A7EAFDD7CF229BAE547E4BB7B05DBF2A56EB633C4A98FBDFCE52F7FF95F31FFEE75134B927F857682D6EECE4AAD9AB9C46F4909627D0FAE6AC981A114FE541FBBC9B7179ECB5FFEF297FFB5F26FB778A6E427CA51FBF51CEEF74FEE3D78D2EC7C86F3D3AE8557E42D4F29FEA848DC23973A287FF9CB5FFE57C9FF2A99CF94607FB07BDE4DD69EA79A3D1F60F76CAB999CE747DEBAC051BD9B39F1201ECC92BFFCE52FFF0BE77F536237DB335AD3B83C7341449BEAD4F1FDEEEEBE7482569AD6BDAE5FB719B8FCE52F7FF9DF5E15F6AE6E0EBFF5B7F7647B3D457B647FEAE8F9D4295B533FC1F40705287FF9CB5FFE775085987C947E5E2FE53675A144EFF4E0E738EF8B4BB60774DE4FF8F297BFFCE57F1B85E85FEC36FF3BAEDD874B2E157FCF63AEFCE52F7FF9DFF2DEB94379FE7B103F1CC1790EFF33A2FF2F75D2C3773EE0CA5FFEF297FF8D4FCDE205D4E9DAB73053ABF3A9FEEFEFA5D9595940C2F2973FF2BFFD79D92EDB94FFAF99B3ADA64EE89DBF7810F9CB1FF9DFDA581C47E17048E5C0395AD296BFFC91FF7DEC978B13B178BC3EFCA39C7F884BFEF247FE777CD66EFA25BDF46380C85FFEC8FF2E77CAC59D6C0291BFFC913F00B4563B0FBBBFB7D32AF9CB5FFEF297FF05C2BF6EAF57AF2DC4AA31B3C0095BBBDDFDDD2EDBC4AAF750FEF297BFFCAF927FF75D672AC1FAC569C7E2D562C38BF988D6C734A6AC70BB33CC6E227DC359CD7E66E42F7FF9CBFF62F9D7F77647E793C4BEDE0D526D15D6AFAAC2541756FB21D497D6419BC67A5FDC684CA6DDDCB05F88755385D5FE2656F297BFFCE57F1BF90FB39B7E785B0962F2A31F3F7E3E3DFD1C6FE39DF92D1E2BF6A2C635ECBFB40963E53A4434EC1EAEC3AB69E5ABF077086F89CAFA37FBCD889F8A58FD617F55F297BFFCE57FF9FC4BC336FB2568C7E237265F6F63F267DD83B769CA1AC31FB75EFFAE9B4FE010DABC5E30E076C7DF4DB06ED61CE35D87B6C95FFEF297FFE5F3DF4CEB5661F5AAA3E40787F873ECE84B1B1AC31947FFD198FF68D3CB2A8D89EDF42D85B3C4A6E9FE7CECF297BFFCE57F99FCB7D3860525581D9349F710CCEA3C877B36FBDB2AE1975BA9422D441C37D7DB7F9FAC351A263EB4359F71B12525D884950C0BC297BFFCE52FFF0BE45FDBB00D5B4F2588B53836ABF680C8C2BD7CAB5394A0E63FDE7EBDDCDA1294FE6E5EBA5F6B544BD01D2EEB02E536F4A657537B3887FD55C95FFEF297FF55F28FC34D11DB5697D934C3F16A41ECE9C4A7B63D5353B9538DC8E5404FC9FFBF9FE00BA3F0EFDFBF53F76BF89B5EEC35A272AB052D2518F6DFB2D97F66B3BF4FB21BBEFCE52F7FF95F2CFF1A75FD1BA5B6A55178EA84D2F694A4EEFEBDCBEC8E1B6FB504BF77B7925B7D1873881FC21A784CBE84DFAEA1E4B3D98DE349BBAAB842F9CB5FFEF2BF7CFE75302AEBA9234B9CA4A4720CD3836C7B5AD7CC8EBE34F7D99CAD1CEB30231BFB380EC1B110A9B3E3332584D8F1748BC9C7FCCB701FBBD69DEBC5CFB9FCE52F7FF95F37FFBAC27AFF57B8C54D97F5B4A7BFA6939D36BDF95D778C4B874286539CFD35B347AE28258885A843EAF864DBEB987C37FCF644AC54DF54D0B245F9CB5FFEF2BF62FE7585ED6AD36CA5B6EA601FDBFD4B35E178F8A32D6B797E387315DA42D46ED67D74B104298452B8D29DF632BD7A503E06DB7E9853D1E52F7FF9CBFFF2F9C7ADD7FBE9BF18C45A2CE95DBBB7AA5C79515A558E80C4EEA40322651A580B51133B7915865D096A37CB9D322CCE845007DC87ED5C094A7FDB4F724D3BBE2A7FF9CB5FFE17CE3FADFC9FFF5CB07FD15C6DC092DFC4D8EC824A07A9EBFA5397DBAEA58323E39D7A5C7B385B096A93EAD78094DBF8649DAF956177EAEBC110EEA4E9673BE96B1390BFFCE52FFF8BE55F16FEEF1F96ED9F295AAAB0FC6791D2A1E7F1993A61297396218C7AF5F978A77B4BD7329CBC04F12CA9927F6D4C3C952BCEB986FDB41F66C7E23822A7E335F297BFFCE57FDDFCDFDE85998B26E2456A0FBD6BD3C6CED6EE97E9587DA6DC7938CFEEB8A1578234F81EECEFB15B69CF6493BFFCE52FFF3F37FF874317E875C34F1D8FF7BB83FE30FDB3A86F6F76D9749CFACD4C394FB2B9E13C6B96BFFCE52FFF53E5BF3ACF303DCC0E67C3FEB03593F970EA64EA3191331DF1198E6CB9FCE52F7FF95F2BFF63837DCBBBCED4BCE5DF1CE28EB80B6C57FEF297BFFCFFF4FCEF8958E42F7FE40F000000C01DF8FC080000BC179F360000C07BF1F13B0000F05E7C5803000000000077E7DB130000000000706F861F0000000000000000000000C0ADFBBA0500000000000000000000006EDDEA11000000000000000000000000000000000000000000000078AB2F1B0000000000000000000000000000000000000000000000E0AD1EBE0300000000000000000000000000000000000000000000000000000000000000000000C0FDFBBC060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080EBFBF40D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000EFB38000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070091FBE02000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009CC4FF0134C57BC5]]>
</BitmapFile>
</BitmapFromFile>
</Producers>
</Bitmap>
<Material Name="CorneriaMaterial" Shading="1" Light="0" ZBuffer="0">
<Textures>
<MaterialTexture Texture="CorneriaBitmap" TextureWrapMode="2" TexCoords="1"/>
</Textures>
</Material>
<Model Name="Box" Position="3.7319 -2.9679 -7.7437" Rotation="0.3905 0.7984 0" RotationVelocity="0.114 0.041 0">
<OnRender>
<UseMaterial Material="BoxMaterial"/>
<RenderMesh Mesh="BoxMesh"/>
</OnRender>
</Model>
<Mesh Name="BoxMesh">
<Producers>
<MeshBox/>
</Producers>
</Mesh>
<Material Name="BoxMaterial" Shading="1"/>
</Content>
</ZApplication>