View Full Version : Texture that always faces to the viewer?
Diapolo
05-03-2001, 05:50 AM
I´m talking about these 2D textures, that spin with, if you move arround them, so that you allways see the front of it.
Many games use it and I want to use it for a particle system ... but I dunno how this technique is called and how I can code this in OpenGL?
Regards,
Diapolo
DFrey
05-03-2001, 06:00 AM
That method is called billboarding. Search the forum for billboards and you should find what you are looking for.
[This message has been edited by DFrey (edited 05-03-2001).]
Humus
05-03-2001, 08:29 AM
Try this:
float mat[16];
glGetFloatv(GL_MODELVIEW_MATRIX, mat);
Your "Up" vector (mat[0],mat[4],mat[8])
Your "Right" vector (mat[1],mat[5],mat[9])
Use those to compase a quad and you're done. http://www.opengl.org/discussion_boards/ubb/smile.gif
Look also on NAte Miller's web site for some implementation sample.
rIO.sK http://www.spinningkids.org/umine
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.