Archived

This topic is now archived and is closed to further replies.

VanKurt

Orientated billboards in particle sys

Recommended Posts

VanKurt    133
Hi there! At the moment my billboards are just quads that face the viewer. That is OK if you use textures with spheres (Balls, Glowythings etc.) on them for the particles. But if you have different textures (e.g. with an arrow on it) that looks stupid because all the arrows point into the same direction. It would be much better if the billboard was rotated in a way that it points into the direction that it is moving to. I hope you can understand what I mean... ;-) But I don''t know how to do that because you would have to rotate the quad not around one of the normal axes (XYZ), but an axis that goes from the viewer to the center of the quad...... Anyone knows how to do that?? Thanks!!!

Share this post


Link to post
Share on other sites
Trienco    2555
if you already have them facing the viewer, then i dont see which part is giving you the trouble. just dont even think about "rotating" them in a "lets call glrotate"-way. you know the direction for two vectors. one towards the "camera" and one towards the point. lets call them "forward" and "up". the crossproduct will give a value "right" and another crossproduct between forward and right will give a new valid "up". plug those three and the position into the particles transformation matrix and that should be it.

Share this post


Link to post
Share on other sites