I am designing a class that basically can draw a character, with the member function draw().
This is half design and half implementation.
The class has following variables:
CVector3 location // cvector is struct float x, y ,z
Float rx, ry, rz // rotation variables
There are more but these are the basics. When GLUT calls the keyboard function ( member )it assesses whether to move the character or rotate.
The camera rotates around the character so the character class only cares about where it is and where its looking.
I don’t know how to do this. How could i make it so the character will rotate with right and left keys. And move towards the way its facing, with forward and back keys?