Hiya Guys,
hope you can help me, I'm trying to place a small health bar above a 3d object, I'm wanting to place a stretched sprite above the 3D object but have no way to calculate the screen position from the 3D object position, or should I say this is what I need help with, how to get a 2D coordinates from a 3D object coordinates.
Here is my current code of which I know doesn't work as the X and Y of dbObjectPosition are 3D coordinates, but this ight give you a better understanding of what im trying to achieve.
void enemiesHudCheck ( void )
{
for ( int i = 0; i < ZOMBIESPAWN; i++ )
{
int hudx = dbObjectPositionX(zombies[i].obj);
int hudy = dbObjectPositionY(zombies[i].obj);
dbSprite (zombies[i].obj,hudx,hudy,500);
dbStretchSprite (zombies[i].obj,zombies[i].life*100,100);
}
}
cheers
Moops