An Explanation of Hitzones
Posted: Thu Jan 22, 2009 6:21 pm
Good clean fun.... sorta
https://forums.bzflag.org/
Thanks. A couple of things to add. Firstly, I've been asked to share my code forDestroyer wrote:Hm nice one snick!
Code: Select all
// draw the tank
if ((player == NULL) || !useTankDimensions) {
// align to the screen axes
glRotatef(float(myAngle * 180.0 / M_PI), 0.0f, 0.0f, 1.0f);
glRectf(-size, -size, +size, +size);
}
Code: Select all
// draw the tank
if ((player == NULL) || !useTankDimensions) {
// align to the screen axes
// glRotatef(float(myAngle * 180.0 / M_PI), 0.0f, 0.0f, 1.0f);
// glRectf(-size, -size, +size, +size);
float hitzone = 4.245f;
glBegin(GL_TRIANGLES);
for (float a = 0.0f; a < 6.29f; a += 0.262) {
glVertex2f(0.0f, 0.0f);
glVertex2f(hitzone * cosf(a), hitzone * sinf(a));
glVertex2f(hitzone * cosf(a + 0.262), hitzone * sinf(a + 0.262));
}
glEnd();
}
You may be seeing the height box. Try jumping and see if the box gets bigger.dexter wrote:Nice of you to share that with us. I compiled a client with it and my tank did not really show up as a circle on the radar. Somehow a cross between circle and square, I have to play with it some more and see what's up. Anyways, good job.