In class MyEventReceiver : public IEventReceiver:
Code: Select all
case KEY_KEY_Q:
player->angle-=45;
break;
case KEY_KEY_D:
player->angle+=45;
break;
Code: Select all
myPos.x += cos(angle) /10.;
myPos.z += sin(angle) /10.;
anms->setRotation ( core::vector3df ( 0,angle,0 ) );
anms->setPosition ( core::vector3df ( myPos.x,myPos.y,myPos.z ) );
myPos is a struct with floats.