# The Industry's Foundation for High Performance Graphics

1. ## rotate sprite

Code :
```	glVertex3f(-5.0625f+cos(angle)*up+horizontal+space_two, 0.625f + sin(angle)*up + vertical + space, 0.0f);
glTexCoord3f(1.0f, 0.0f, 0.0f);

glVertex3f(-5.0625f + cos(angle)*up + horizontal + space_two, 0.5f + sin(angle)*up + vertical + space, 0.0f);
glTexCoord3f(1.0f, 1.0f, 0.0f);

glVertex3f(-4.9375f + cos(angle)*up + horizontal + space_two, 0.5f + sin(angle)*up + vertical + space, 0.0f);
glTexCoord3f(0.0f, 1.0f, 0.0f);

glVertex3f(-4.9375f + cos(angle)*up + horizontal + space_two, 0.625f + sin(angle)*up + vertical + space, 0.0f);```
here is the code for my bullet , I want to rotate the bullet around my plane sprite with the same place as my plane sprite is facing.

2. can I please get some help

3. well I have worked on my code, I am stuck on how to rotate the bullet sprite around the plane sprite
Code :
```	glPushMatrix();

glBegin(GL_POLYGON);
glTexCoord3f(0.0f, 0.0f, 0.0f);

glVertex3f(-5.0625f*cos(angle) - 0.5f*sin(angle), -5.0625f*sin(angle) + 0.5f*cos(angle)+up, 0.0f);
glTexCoord3f(1.0f, 0.0f, 0.0f);

glVertex3f(-5.0625f*cos(angle) - 0.625f*sin(angle), -5.0625*sin(angle) + 0.625f*cos(angle)+up, 0.0f);
glTexCoord3f(1.0f, 1.0f, 0.0f);

glVertex3f(-4.9375f*cos(angle) - 0.625f*sin(angle), -4.9375f*sin(angle) + 0.625f*cos(angle)+up, 0.0f);
glTexCoord3f(0.0f, 1.0f, 0.0f);

glVertex3f(-4.9375f*cos(angle) - 0.5f*sin(angle), -4.9375*sin(angle) + 0.5f*cos(angle)+up, 0.0f);
glEnd();

glPopMatrix();```

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•