Ejemplo n.º 1
0
        private void _StartTurn(Vector2d targetRot)
        {
            long tempCheck;

            if (targetRot.NotZero() &&
                (((tempCheck = Agent.Body._rotation.Cross(targetRot.x, targetRot.y)) != 0) ||
                 (Agent.Body._rotation.Dot(targetRot.x, targetRot.y) < 0))
                )
            {
                if (tempCheck.AbsLessThan(turnSin) && Agent.Body._rotation.Dot(targetRot.x, targetRot.y) > 0)
                {
                    targetRotation = targetRot;
                    Arrive();
                }
                else
                {
                    cachedBeginCheck = tempCheck;
                    targetRotation   = targetRot;
                    targetReached    = false;
                }
            }
            else
            {
            }
        }