float ty = target.y();
float goalx = _idleGoalX;
float goaly = _idleGoalY;
float goalz = 0;
HLocatable goal = getGoal(target, app);
if(goal != null) {
goalx = goal.x();
goaly = goal.y();
goalz = goal.z();
}
// Get rotation that points towards the goal, plus easing
float tmp = HMath.xAxisAngle(tx,ty, goalx,goaly) - rot;
float dRot = _turnEase * (float)