How to billboard??
I have many one face elements. And I need this face was pointing always to front (billboard). The solution is to rotate the face. But i have only the view point (from) and the dest point (to), used to generate the view matrix.
Some formula to obtain the ang of rotation?? (in this case, i use the inverse of angle)
-eng3d.softhome.net-
This is how I do this:
You start out with the points of the face, in local coordinates, facing along the Z axis. You use the INVERSE of the view matrix to transform these coordinates as NORMALS; in other words, don''t translate them, just rotate them. Then you translate these modified coordinates to the correct position in world coordinates. If you need some code, you can download the particle demo source from my page.
lntakitopi@aol.com | http://geocities.com/guanajam/
You start out with the points of the face, in local coordinates, facing along the Z axis. You use the INVERSE of the view matrix to transform these coordinates as NORMALS; in other words, don''t translate them, just rotate them. Then you translate these modified coordinates to the correct position in world coordinates. If you need some code, you can download the particle demo source from my page.
lntakitopi@aol.com | http://geocities.com/guanajam/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement