Archived

This topic is now archived and is closed to further replies.

robert_s

annoying vibrating lines in flight sim!

Recommended Posts

Hi all!! Here I have a bit funny problem in my flight sim engine and I don't know if I can explain properly!! Imagine you see in front of you a horizontal line across the window you looking at. say its about 1000 units on -Z so its quite far in my case but still clearly visible! now when I move the planes nose up slowly looking all the time at the vertical line in front of me I can see on the window that the line obviously doesn't move it stays at the same position only plane moves. so on the window I can see the line moving down when you reverse physics ie. line moves plane doesn't. when I move the plane nose up slowly the line moves smoothly down the window but when I do same thing quickly then the line appears to vibrate ie. slightly going one unit up and down. It does that quickly so all you can see is a blured double line. When I slow down again it becomes more visible and I can clearly see just one line. I know it might be funny but its quite annoying!! May be you guys had same thing and can help me!! Do you think this is caused coz of my plane movements? I am using a timer to determine how far to move. (velocitiy) When the velocity is low I can't see any distortion to the whole image but as soon as I increase the velocity then eveything becomes distorted especially when I roll the plane or rapidly move the planes nose up or down. It looks very similar to the effect of a single buffer ie. you can see drawing in action. Also I forgot to add when I hold eg. bottom arrow key to lift the planes nose up or down then almost every second the whole animation freezes for a short moment and then continues. The quicker you want to turn the more often this happens!! I am sure its something wrong with my timer!!! arghhhhhh..... I am using almost the same approach as described in this book example. if you dont mind then please download from here with source code and you'll easily c what I mean! http://homepage.ntlworld.com/robert.stuliglowa/projects/GL-Flightor/temp/demo.zip there is same problem as I have.. click/hold and move mouse quickly up and down! you'll c the horizon line and the rest rendered as in single buffer even though its double buffer! why is that????????? this is my keyboard func. void Special( int key, int x, int y) { switch (key) { case GLUT_KEY_DOWN: if( MouseY < 800.0) {MouseY += 20.0;} break; case GLUT_KEY_UP: if( MouseY > -800.0) {MouseY -= 20.0;} break; case GLUT_KEY_LEFT: if( MouseX > -1000.0) {MouseX -= 50.0;} break; case GLUT_KEY_RIGHT: if( MouseX < 1000.0) {MouseX += 50.0;} break; } glutPostRedisplay(); } I know I am incrementing by quite large values! This is only the way I know how to increase the planes speed. but I think this should not matter. there must be wrong somethingelse! thanks all for your help! Edited by - robert_s on November 14, 2001 6:03:08 AM

Share this post


Link to post
Share on other sites