This question has been asked offline by users.
It seems the main problem is that the center of rotation of the main scene is not taken into account, since the small scene showing the navigation cube always has a center of rotation at the origin.
One could therefore try the following, in order to rotate around the main scene's center:
- Consider the view matrix of the 3D cube scene a rotation matrix R
- Obtain the center of rotation c from the main scene
- Create a translation matrix T- that translates by -c
- Create a translation matrix T+ that translates by +c
- Set the view matrix of the main scene to T+ * R * T-
This is of course without any guarantee for correctness - I didn't try ;-)
Just a proposal how to start.