PDA

View Full Version : face on



aNt
07-20-2000, 08:01 AM
hello all

i wont to have a quad that can spin around a space, but always be face on. so it scales and stuff.. anyone got any pointer.. ?

aNt

Whittick
07-20-2000, 08:22 AM
Just rotate the quad, then translate it.

glRotate()
glTranslate()
drawquad()

Is that what you mean?

Chris

aNt
07-25-2000, 06:27 AM
yer. but like the quad is face to the camra all the time. is there like a simple rotate, translate trick. so the face of the quad is facing the camra ?

i've seen it dont with trees in flight sims.

ngill
07-25-2000, 01:19 PM
the quad has two faces, so it doesn't matter! unless you have glEnable(GL_CULL_FACE); (it is disabled by default) otherwise what you could do is... set glFrontFace to CW/CCW depending on what side you were viewing and make that a front side!

Does that make sense? Honestly, if you're only drawing one quad, it doesn't really matter!! just disable GL_CULL_FACE if it's on.

[This message has been edited by ngill (edited 07-25-2000).]

Whittick
07-26-2000, 01:57 AM
Oh.. now I see what you want (I think). You basically want the quad to always face the camera while it moves.

basically
Rotate()
Tanslate()
then rotate in reverse
Rotate()
to face the quad back at the camera
so if you rotated by 4 degrees first rotate by -4 the second time
DrawQuad();

Chris

aNt
07-27-2000, 05:34 AM
cool thanks chaps.. most cool...