• Create Account

### #Actual___

Posted 07 October 2012 - 07:10 AM

Now i have this:

http://youtu.be/IfjROPkTTAM

and i use this:

not important stuff like drawing jet model
glPushMatrix();

gluLookAt(kold.x,kold.y,kold.z,kold.x+ksp.x,
kold.y-ksp.y,kold.z-ksp.z,0,1,0); //camera dude
glDisable(GL_DEPTH_TEST);//only to see the airlieron
glColor3f(1,0,0);
glTranslatef(PHYSIC_MODEL->AIRLIERON_LEFT->model->CENTER_POINT.x,PHYSIC_MODEL->AIRLIERON_LEFT->model->CENTER_POINT.y,PHYSIC_MODEL->AIRLIERON_LEFT->model->CENTER_POINT.z);
glRotatef(PHYSIC_MODEL->AIRLIERON_LEFT->pitcha,1.0f,0.0f,0.0f);
glTranslatef(-PHYSIC_MODEL->AIRLIERON_LEFT->model->CENTER_POINT.x,-PHYSIC_MODEL->AIRLIERON_LEFT->model->CENTER_POINT.y,-PHYSIC_MODEL->AIRLIERON_LEFT->model->CENTER_POINT.z);

glMultMatrixf(PHYSIC_MODEL->YPRangle.AIR_MATRIX);

PHYSIC_MODEL->AIRLIERON_LEFT->model->DrawSimpleModel();
glEnable(GL_DEPTH_TEST);
glPopMatrix();


I will explain some things

i have an airlieron model in position (CENTER_POINT [x,y,z] i don't know what is the center but i do now that is not 0,0,0 ;x)
so in order to simple rotate for test purposes i do [opengl uses stupid ordering ;P]
i translate airlieron to 0,0,0 point, then i am rotating it and then translating to its position, then i apply JET matrix as seen above.
Any suggestions to make it work ?:X

SOLVED. The thing was that i called glMultMatrixf last instead of first x_X right after glulookat

### #1___

Posted 06 October 2012 - 11:18 AM

Now i have this:

and i use this:

not important stuff like drawing jet model
glPushMatrix();

gluLookAt(kold.x,kold.y,kold.z,kold.x+ksp.x,
kold.y-ksp.y,kold.z-ksp.z,0,1,0); //camera dude
glDisable(GL_DEPTH_TEST);//only to see the airlieron
glColor3f(1,0,0);
glTranslatef(PHYSIC_MODEL->AIRLIERON_LEFT->model->CENTER_POINT.x,PHYSIC_MODEL->AIRLIERON_LEFT->model->CENTER_POINT.y,PHYSIC_MODEL->AIRLIERON_LEFT->model->CENTER_POINT.z);
glRotatef(PHYSIC_MODEL->AIRLIERON_LEFT->pitcha,1.0f,0.0f,0.0f);
glTranslatef(-PHYSIC_MODEL->AIRLIERON_LEFT->model->CENTER_POINT.x,-PHYSIC_MODEL->AIRLIERON_LEFT->model->CENTER_POINT.y,-PHYSIC_MODEL->AIRLIERON_LEFT->model->CENTER_POINT.z);

glMultMatrixf(PHYSIC_MODEL->YPRangle.AIR_MATRIX);

PHYSIC_MODEL->AIRLIERON_LEFT->model->DrawSimpleModel();
glEnable(GL_DEPTH_TEST);
glPopMatrix();


I will explain some things

i have an airlieron model in position (CENTER_POINT [x,y,z] i don't know what is the center but i do now that is not 0,0,0 ;x)
so in order to simple rotate for test purposes i do [opengl uses stupid ordering ;P]
i translate airlieron to 0,0,0 point, then i am rotating it and then translating to its position, then i apply JET matrix as seen above.
Any suggestions to make it work ?:X

PARTNERS