Yeah, so I was fiddling with this program of mine just yesterday because it won't run. well, it ran alright, but it ran weird. the 3D models are not displayed on the screen, and the cursors tris are drawn weirdly. only the 2D images and texts are shown correctly.
Anyways, I of course started to check what could probably be the main problem immediately. but after checking here and there, I really got no clue on what's going on. then I thought it's because of the on-board graphics adapter. but soon that theory was broken because of other applications that were running smoothly, even though there are 3D models as well.
Then I started to get curious on the camera. since the others ran well, that must've meant that my application is the one I should take a closer look at. after a series of trying here and there, I finally tried to set a fixed camera where I'm going to display the models. and it worked!! the camera IS the main problem.
Having a clue, I started to check thoroughly around the camera and the cause of the camera malfunction. then after a little more closer look, I found out that the camera coordinates are messed up. instead of a Vector3(50, 0, 50), I have this Vector3(5+E7, 0, 5+E7). that's about 50 million in coordinates!! why did my coordinates went up so high?
And after trying various all checking, I finally found out that the main problem is not the camera, but the Regional Setting of my computer. confused? here let me explain. turned out that, when I was installing a new OS for my new computer, I set the Regional Setting for Indonesian. and since my coordinates are in float, which I get around 50.000000 (in float that's 50 with 6 decimals) and since it's in bloody Indonesian setting, the application read it as, yep you said it, 50.000.000 aka 5+E7. so all I had to do, was just set the Regional Setting back to English (United States) and voila, the application ran without a flaw.
Crappy stupid Regional Setting just cost my precious one day programming away. never again will I trust Indonesian settings for my applications. >:3
Thursday, May 24, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment