public override Vector2?CalculateResultingVector()
        {
            if (ownEntity.velocity == Vector2.Zero)
            {
                return(Vector2.Zero);
            }
            SetFeelers();
            CheckFeelers();

            if (!(feeler1hit || feeler2hit || feeler3hit))
            {
                resultingVector = Vector2.Zero;
                lastDirection   = 0;
                return(resultingVector);
            }

            int strength = 10;

            if (feeler2hit)
            {
                strength = 20;
            }
            if (feeler1hit && feeler2hit && feeler3hit)
            {
                strength = 30;
            }

            Vector2 vector = Vector2.Normalize(ownEntity.velocity);



            if (feeler1hit && !feeler3hit)
            {
                vector         = BehaviourUtil.RotateVector(vector, Math.PI / 2);
                lastDirection += 1;
            }
            else if (!feeler1hit && feeler3hit)
            {
                vector         = BehaviourUtil.RotateVector(vector, -Math.PI / 2);
                lastDirection -= 1;
            }
            else
            {
                if (lastDirection > 0)
                {
                    vector         = BehaviourUtil.RotateVector(vector, Math.PI / 2);
                    lastDirection += 1;
                }
                else
                {
                    vector         = BehaviourUtil.RotateVector(vector, -Math.PI / 2);
                    lastDirection -= 1;
                }
            }

            vector         *= strength;
            resultingVector = vector;
            return(vector);
        }
        private void SetFeelers()
        {
            Vector2 feeler2 = Vector2.Normalize(ownEntity.velocity);
            Vector2 feeler1 = BehaviourUtil.RotateVector(feeler2, -Math.PI / 6);
            Vector2 feeler3 = BehaviourUtil.RotateVector(feeler2, Math.PI / 6);

            feelerArray1 = new Vector2[5];
            feelerArray2 = new Vector2[5];
            feelerArray3 = new Vector2[5];

            for (int i = 0; i < feelerArray1.Length; i++)
            {
                feelerArray1[i] = feeler1 * (i + 2) * 20;
                feelerArray2[i] = feeler2 * (i + 2) * 20;
                feelerArray3[i] = feeler3 * (i + 2) * 20;
            }
        }