My player has the following hierarchy:
Hero (GameObject) Model (child of "Hero", centered at 0-0-0) Camera (child of "Hero")
The camera should be allowed to
- change its position around the Model in a circle ("rotate around the center") - rotate so that it always faces the Model - move up and down - move nearer and further from / to the Model
I know how to do that using Quaternions, but as I'm doing this in a coroutine and using Lerp, I found myself in situations where the camera would get right through the model as this was the shortest path between the destination and the target vector.
I would now like to use pure angles (Sin and Cos), preferrably without LookAt. Can somebody share how I would position and rotate the camera according to the angle, perhaps even taking a camera height variable into account as the camera should also be able to move up and down, still facing the player?
That would be the bomb!