46
Support / Re: Argh! setScale collisions!
« on: May 18, 2008, 10:31:57 am »
Okay, I've been struggling with this for hours. At first I didn't notice that the XML file exports light sources (D'oh).
Everything is perfect if I only use ambient light. The structure, positions, and light are all correct.
However, if I add a light source, it appears significantly more powerful when rotateMesh() has been applied and it doesn't seem to matter whether the light itself is created and added to world before or after rotatMesh() is called.
I have uploaded a couple of screenshots to show what I mean:
<a href="http://alan.alwebwiz.net/withrotate.png">With_rotate</a> shows what happens if rotateMesh() is applied
<a href="http://alan.alwebwiz.net/withoutrotate.png">Without_rotate</a> shows what happens if it is not applied
I have tried to put the camera in almost exactly the same position. The actual locations and facings are shown in the corner. The only lines I have commented out are:
area.rotateMesh();
area.setScale(1.0f);
Everything is perfect if I only use ambient light. The structure, positions, and light are all correct.
However, if I add a light source, it appears significantly more powerful when rotateMesh() has been applied and it doesn't seem to matter whether the light itself is created and added to world before or after rotatMesh() is called.
I have uploaded a couple of screenshots to show what I mean:
<a href="http://alan.alwebwiz.net/withrotate.png">With_rotate</a> shows what happens if rotateMesh() is applied
<a href="http://alan.alwebwiz.net/withoutrotate.png">Without_rotate</a> shows what happens if it is not applied
I have tried to put the camera in almost exactly the same position. The actual locations and facings are shown in the corner. The only lines I have commented out are:
area.rotateMesh();
area.setScale(1.0f);