   moving around target/player -  circle behaviour
  Hi guys i have 2 methods to move my sprite, moveX and moveZ. What i want to do is move my enemy sprites around a target using moveX and moveZ which just increments the x or z positions i.e x += speed, z += speed.I am not sure if this is right but so far i have thisfloat x = enemy->GetPosX() - player->GetPosX();float z = enemy->GetPosZ() - player->GetPosZ();float angle = atan2(z, x);float distance = sqrt(x*x + z*z);enemy->MoveX((player->GetPosX() + cos(angle + deg) * distance));enemy->MoveZ((player->GetPosZ() + sin(angle + deg) * distance));enemy->CheckState(::WALK_TOWARDS);i don't think moveX and moveZ will get the right speed to go around target?   
  If, by "speed," you mean how quickly the enemies rotate about the player position at a constant distance, and your variable "deg" is that speed in radians (not degrees) per rendered frame, your equations should work. Note: the enemies will not rotate to face the player using that method. Only their positions with respect to the player will change.What are you seeing when you try your method?   