How would you attach the camera to an object?
At first, I tried synchronizing model and camera rotations, but apparently camera needs to be translated too(spend god damn 2,5 hours till I realized that). I attempted to fiddle with translation in relation to model rotation values but I didnt go far away,
So, now I got this idea. Lets say, I have some 3d model, I put it in a box, I find the very middle point of top surfice, I lift it up(in another words, I find normal of top box surfice) and lastly, I move it a bit behind the model. In this case, if model does any kind movement, camera will move too in the right way.
So, it looks it should work, but maybe missing something?
Thats my plan
http://www.uploadimage.co.uk/images/265396Untitled.gif
Edit: yes, I am missing something. All I can do is to get current matrix which will give me the position coordinates. If I will have box rotated, then I am gona get that middle point?