TGLMatrix ModelViewMatrix;
glGetFloatv(GL_MODELVIEW_MATRIX, ModelViewMatrix);
TVector3f Right = TVector3f(ModelViewMatrix[0], ModelViewMatrix[4], ModelViewMatrix[8]);
TVector3f Up = TVector3f(ModelViewMatrix[1], ModelViewMatrix[5], ModelViewMatrix[9]);
TVector3f v1 = Position + ((-Right - Up) * Magnitude * 8);
TVector3f v2 = Position + ((Right - Up) * Magnitude * 8);
TVector3f v3 = Position + ((Right + Up) * Magnitude * 8);
TVector3f v4 = Position + ((-Right + Up) * Magnitude * 8);
billboarding problem
Hi,
Has anyone had problems with billboarding, namely with the fact that the billboarded face starts to "wrap" or "break" under certain angles if something else besides itself (and other billboarded faces) is drawn into the scene (as if one of the triangles in the quad is drawn under a right angle to the other one, leaving only 1 triangle visible)... This is giving me quite a headache. Maybe it''s my billboarding code which I wrote with the help of the GameTutorials article:
though it seems to work all by itself...
And another question: the above code only allows billboarding of quads. What if I need to deal with random polygons? Can anyone give me directions where to look as Google seems to be scarce on billboarding info as it is.
Thanks,
Crispy
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement