Hi guys i started today my first question .im new on the forum so...Today i wanna know if anyone know how to create a simple directx circle for add to the player head in sobeit.
Hi, you should handle a frame by frame drawing, just take a look into proxyIDirect3D9.cpp, you may user render-> to draw your stuff, since only DrawBox and DrawBoxi is defined in d3drender.cpp you should add DrawCircle method, that should look like this:
PHP:
Код:
void
DrawCircle
(
float mx
,
float my
,
float r
,
D3DCOLOR
colour
)
{
static
const
int
CIRCLE_RESOLUTION
=
10
;
D3DVertex verts
[
CIRCLE_RESOLUTION
]
;
for
(
int i
=
0
;
i
SetFVF
(
VERTEX_FVF
)
;
d3ddevice
-
>
DrawPrimitiveUP
(
D3DPT_TRIANGLEFAN
,
CIRCLE_RESOLUTION
-
2
,
verts
,
sizeof
(
D3DVertex
)
)
;
}
Then you should get the main actor camera CVector and the game Camera CVector, match them and draw what you want. As example for this you may want to look into clickwarp() method