Code: Select all
case KEY_KEY_W:
{
if (status_act != WALK)
ModelAction(WALK);
facing = core::vector3df( sin( ( Mynode->getRotation().Y + 180) * core::PI/180.0f ), 0, cos( ( Mynode->getRotation().Y + 180 ) * core::PI/180.0f ) );
facing.normalize();
core::vector3df newPos = (facing*8.0f) + Mynode->getPosition();
Mynode->setPosition( newPos );
break;
}
can i make it stop?