14.17 FaceTarget
This function is a more general approach to FaceBall
as it receives a VecPosition
target as the direction the agent should face.
SkillType NaoBehavior::FaceTarget(VecPosition mypos, VecPosition target){
double distance, angle;
getTargetDistanceAndAngle(target, distance, angle);
if (abs(angle) > 10) {
return goToTargetRelative(mypos, angle);
} else {
return SKILL_STAND;
}
}