I'm currently working on getting my keyboard IO set up. Basically I have a 3rd person view and want my character to go foward when the forward key is pressed (usually w).
My problem now is in determining the direction in which the model is facing. I use
Code: Select all
core::vector3df dir(sin(mesh->getRotation().Y * 3.14159/180.0f), 0, cos(mesh->getRotation().Y * 3.14159/180.0f) );
The question I'm thinking about is: Is there a way to balance this "offset" without having to remember it for each model? Or is there a built-in function to get the "forwad" direction of a model?
Thanks for your answers!