AIM VERSUS FIRE
I am trying to shoot fireball. the thing is , when i lookup and shoot. the fireball is off aim.
i save the angles of the ''look-around'' and the players coord.
then this code:
weaponx += sin(weaponyaw*piover180);// * ( 1.0f );// * COS[(int)(m_vheading*10.0f)];
weaponz -= cos(weaponyaw*piover180);// * ( 1.0f );// * COS[(int)(m_vheading*10.0f)];
weapony -= sin((weaponpitch)*piover180);// * ( 2.0f );// + cos(weaponpitch*piover180));//0.5;
glTranslatef(weaponx,weapony,weaponz);
i need a better calculation for weapony. Does anyone know?
Thanks,
Bobby
Game Core
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement