Best Method to Rotate Camera around a GameObject while looking at another?
I have a rather unique issue where I am attempting to perform a camera sweep over a symmetrical game board when players swap turns during a two-player turn-based game. The method I am using that is called is:
transform.position = Vector3.Slerp(this.transform.position, CameraTransform.transform.position, Time.deltaTime);
When this is called, It moves directly from the start transform to the target transform over time.deltatime during LateUpdate();
The goal is to have the MainCamera sweep while looking at origin (0,0,0) from a position above the board at Pos(10,10,0) to Pos(-10,10,0), but to do so by rotating around the game board (X and Z axes) at a 30' angle on the Y-Axis.
I need to look at the origin point while rotating, but the actual point of rotation would be around (0,10,0).
Would anyone be able to advise on how I might be able to tackle this?
Thanks in advance!
Your answer
Follow this Question
Related Questions
How to use Quaternion.slerp and Quaternion.LookRotation with a child gameobject 0 Answers
Mobile Gyroscope, make Camera always rotating towards zero point using Quaternion 2 Answers
Delayed LookAt, but only on one axis 1 Answer
How to replicate Transform.RotateAround error using quaternions? 0 Answers
Rotate Ball specific number of degrees and back again 0 Answers