rotating tire rims of car opengl transformations

前端 未结 3 1542
悲&欢浪女
悲&欢浪女 2021-01-25 02:34

Here is the draw function which draws the parts of the car, in this function car rims is checked and flag is checked, and i need to rotate the tire rim as i move the car. Someth

3条回答
  •  清酒与你
    2021-01-25 03:31

    You're almost certainly applying the rotation and transformation in the wrong order, so that the rim is rotated about some point other than the center of the tire.

    You might try doing the rotation in the MODELVIEW matrix and the translation in the PROJECTION matrix.

提交回复
热议问题