Grom
17-02-2007 17:10:09
For some reason I'm getting a very strange error. I have a basic situation where all I'm doing is logging the position of a body. It doesn't move. It's global position should therefore stay the same, right?
I have a body "b", and I call this every frame:
which should consistently spit out "AT 0 0 0" but instead I get:
the x value goes out of range after the first time, and it changes, as does the y value.
Any idea what might be going on here?
I have a body "b", and I call this every frame:
Vector3 at = b->getGlobalPosition();
LogManager::getSingleton().logMessage("AT " + StringConverter::toString(at.x) + " " + StringConverter::toString(at.y) + " " + StringConverter::toString(at.z));
which should consistently spit out "AT 0 0 0" but instead I get:
11:59:09: AT 0 0 0
11:59:09: AT 2.69379e-008 0.787 0
11:59:09: AT 2.57434e-008 0.9444 0
11:59:09: AT 2.57434e-008 0.9444 0
11:59:09: AT 2.52375e-008 0.97588 0
11:59:09: AT 2.49881e-008 0.982176 0
11:59:09: AT 2.47424e-008 0.983435 0
1
the x value goes out of range after the first time, and it changes, as does the y value.
Any idea what might be going on here?