Hey guys,
After searching 2 hours on the forum and asking some people out i finally got somewhere...
I manage to let my node get effected by its rotation but its still not moving in the correct way...
here is the code i am using
if (receiver.IsKeyDown(irr::KEY_KEY_W)) //if "W" is pressed on keyboard
{
vector3df oldpos = node->getPosition(); //gets our node rotation
vector3df oldrot =node->getRotation().rotationToDirection(); //get our rotation of our node and convert it to direction(i gues)
oldpos.X +=1; //add 1 X to our position
node->setPosition(oldpos+oldrot); //adds the rotation and position together
}
if (receiver.IsKeyDown(irr::KEY_KEY_Q)) //if "Q" is pressed on keyboard
{
vector3df oldpos = node->getRotation();//gets our node rotation
oldpos.Y +=1; //add 1 Y to our rotation
node->setRotation(oldpos); //set our node rotation
}
I don't know why the nodes act's strange cause i don't see nothing wrong with the code that it should behave like that.
Thanks in advanced.
C++ is not the Magdalena...it takes patience...shes like the well aged prostitute, it takes years to learn her tricks! she is cruel...laughs at you when you are naked...
Life of a programmer == Const abuse
Thanks, it works
Ill look more into matrices to fully understand the code
C++ is not the Magdalena...it takes patience...shes like the well aged prostitute, it takes years to learn her tricks! she is cruel...laughs at you when you are naked...
Life of a programmer == Const abuse