示例#1
0
void Player::update() {
    Move();
    Direction_Flag_Change();
    DirectionChange();
    Angle_Change();
    SpeedDown();

}
tResult YawToSteer::CalculateSteering()
{
    tFloat deviation = CalcYawDelta(targetLocalYaw, localYaw);

    if (abs(deviation) < deviationThreshold)
    {
        steer = STEERING_STRAIGHT;
    }
    else
    {
        DirectionChange(CalcCorrectionAngle(deviation));
    }
    RETURN_NOERROR;
}