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

Rotation

Started by hexalite2001 Dec 1, 2002 at 11:16 AM 1 replies 250+ views
Original Post
hexalite2001
hexalite2001
Is it possible to get a polygon to rotate according to the camera angle so that it always faces it? Almost like a sprite. If it is, how is this done and whats the math behind it?
flareman
flareman
With DX8, the answer is once again the same: matrices! :D

this matrix business is hyping me a bit... whoooo
in any case, it could be donw (I presume) using a technique not much unalike billboarding (one should keep the polygon oriented to the camera, by inverting the camera matrices in an apropriate way) - check the D3DX helper functions

-----------<<>>-----------
Flareman (a.k.a Ga1adaN)
Primus ante Adain
flareman@freemail.gr
-----------<<>>------------
-----------<<>>-----------Flareman (a.k.a Ga1adaN)Primus ante Adain[email=flareman@freemail.gr]flareman@freemail.gr[/email]-----------<<>>------------
Scheermesje
Scheermesje
The technique you look for is called bilboarding

Look in the DirectX sdk they have an example of it with a terrain with trees which are facing the camera.

Topic Locked

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

Sign in to reply to this topic.