Skip to main content
GameDev.net gamedev.net
🔒 Locked

Billboard Question

Started by RatLord Feb 23, 2003 at 7:44 AM 0 replies 300+ views
Original Post
RatLord
RatLord
Ive got a simple billboard that rotates towards the camera which is fine - using D3DXVECTOR3 vDir = game->camera->target - game->camera->origin; if( vDir.x > 0.0f ) D3DXMatrixRotationZ( &mat, -atanf(vDir.z/vDir.x)+D3DX_PI/2 ); else D3DXMatrixRotationZ( &mat, -atanf(vDir.z/vDir.x)-D3DX_PI/2 ); It does not however work when in first person as the camera can be rotated around any axis what rotation should I use to ensure that it faces the camera all the time no matter what the roation? thanks

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.