/// <summary> /// Vector based on characters current (aka last) facing direction /// </summary> /// <param name="multiplier"></param> /// <returns></returns> private Vector3 CalculateIsoForward(IsometricPlayerMovementController isoContoller) { Vector2 lastDirection = isoContoller.isoRenderer.lastDirectionAsVector; Vector3 isoDirectionalForward = new Vector3(1, 1, 0); if (lastDirection.x == 0) { isoDirectionalForward.x = 0; } if (lastDirection.x < 0) { isoDirectionalForward.x = -1; } if (lastDirection.y == 0) { isoDirectionalForward.y = 0; } if (lastDirection.y < 0) { isoDirectionalForward.y = -1; } return(isoDirectionalForward); }
private void Start() { _movementController = gameObject.GetComponent <IsometricPlayerMovementController>(); }