First of all thank you for your reply.
The important here is to work well on mobiles too.
Imagine you use a mobile and you are on portrait mode and you play.
And you return your mobile at landscape mode..
.. As you can see and from the result, will lose the object.
I had this ("..if box is not on-screen, return it to the center of viewport..") on my mind, but i thought maybe there was a solution.