In the inital state my scene is composed by (the initial state in the figure below):
- A cube whose position is (Xc, Yc, Zc)
- An orthographic camera pointing at the center of the cube and whose position is (Xc + 100, Yc, Zc).
Now, the user can move the cube as (s)he want, in every direction X, Y,Z and can rotate it around theses theres axis.
I’d like the camera move accordingly with the cube so that it still pointing at the center of the cube with a fixed distance between the cube and the camera. (the figure on the right)
The red face being
I can’t find a solution how to move the camera in this way. Does anyone know how to to this?