It says in Psalms “The Lord is your shadow” (Ps. 121:5). This means that God gives us the power to define our relationship with Him. If we want to get close to God, He comes closer to us. If we ignore him, to a certain extent He ignores us.
In parsha Bereshit, we see an example of this concept. After Adam sins by eating the forbidden fruit, he hears God’s voice and hides behind a tree. Of course, God sees Adam and knows exactly where he is, but He asks Adam, “Where are you?” (Gen. 3:9) Adam wants to hide and distance himself from his Creator, so God mimicks this attitude, “distancing” Himself from Adam and acting like He can’t see him.
If you want a more intimate relationship with God, treat God with intimacy. Pour out your heart to Him as you would to a close friend!