private void CalculateDirectionAndRotationToLook()
    {
        Vector3 foodLocation = (Vector3)blackboard.GetValue("currentFoodLocation");

        directionToFood = Vector3Utilities.GetDirectionXZFromTo(transform.position, foodLocation);
        lookRotation    = Quaternion.LookRotation(directionToFood);
    }
Exemple #2
0
 private void calculateDirectionAndRotationToLook(Transform enemy)
 {
     directionToEnemy = Vector3Utilities.GetDirectionXZFromTo(transform.position, enemy.position);
     lookRotation     = Quaternion.LookRotation(directionToEnemy);
 }
 private void CalculateDirectionAndRotationToLook()
 {
     directionToFood = Vector3Utilities.GetDirectionXZFromTo(transform.position, currentTrapPos);
     lookRotation    = Quaternion.LookRotation(directionToFood);
 }
 private void calculateRotation()
 {
     isRotated         = false;
     baseToMeDirection = Vector3Utilities.GetDirectionXZFromTo(baseLocation, transform.position);
     lookRotation      = Quaternion.LookRotation(baseToMeDirection);
 }