Given a fixed rotation and a target "center" point, how to I find the position the camera should be in so that that point is the center? LookAt changes the rotation keeping the position constant. Basically, I'm trying to do the reverse, but the math escapes me :-). Thanks!
Camera is currently psuedo-isometric (orthographic with rotation from Euler angles [X:35.264389683ish°, Y:45°, Z:0°]). Might want to change these a bit or allow rotation though, so ideally a solution would work for any rotation. Can easily get the projection matrix.
EDIT: thinking about it, there would be infinite such positions that satisfy this constraint. I would want to fix the Y component of the position (camera height) and find only an X/Z.
Thanks to Mokosha's answer below, here's the final code I'm using:
private static Vector3 reverseLookAt(Quaternion cameraRotation, float cameraHeight, Vector3 targetPosition)
{
Vector3 d = cameraRotation * Vector3.forward;
Plane plane = new Plane(Vector3.up, -cameraHeight);
Ray ray = new Ray(targetPosition, d);
Vector3 pos = UnityUtils.intersect(ray, plane);
return pos;
}