// Update is called once per frame void FixedUpdate() { Vector3 dirToPlayer; dirToPlayer = player.transform.position + new Vector3(1, 1, 1) - this.transform.position; dirToPlayer.Normalize(); transform.position += dirToPlayer * player.OutputPlayerMovement().magnitude *Time.fixedDeltaTime; }