Billboarding + aligning with velocity direction

Posted by roxlu on Game Development See other posts from Game Development or by roxlu
Published on 2012-10-10T16:15:16Z Indexed on 2012/10/10 21:57 UTC
Read the original article Hit count: 456

Filed under:
|
|
|

I'm working on a particle system where I'm orientating the billboard using the inverted orientation matrix of my camera. This works quite well and my quad are rotated correctly towards the camera.

But, now I want to to rotate the quads in such a way that they point towards the direction they are going to.

In 2D this can be done by normalizing the velocity vector and using that vector for a rotation around the Z-axis (where vel.x = cos(a) and vel.y = sin(a)). But how does this work in 3D?

Thanks roxlu

© Game Development or respective owner

Related posts about c++

Related posts about opengl