Hi everyone,
I am having a problem with a plane object that I can't sort out. I have defined my plane in-game using a custom vertex format. It consists of four vertices as follows:
//Format: {x,y,z,nx,ny,nz,tu,tv}
{0, -0.128, 0.0339, 1, 0, 0, 0, 0},
{0, -0.128, -0.0452, 1, 0, 0, 1, 0},
{0, -0.564, 0.0339, 1, 0, 0, 0, 1},
{0, -0.564, -0.0452, 1, 0, 0, 1, 1},
I want to build a transformation matrix which will ensure that this object is always facing the camera (i.e. the plane is always perpendicular to the camera's look direction). Basically, it's a billboard. I can't figure out how to make it so that the predefined plane always faces the camera though - can anyone suggest how I'd transform these vertices to always face me?
Thanks.