I'm trying to take a RotateAround function and make it happen over time. I've been tinkering with Quaternions to try and get it to work but I can't quite figure it out.
This is the code:
public class RotateCamera : MonoBehaviour {
public Vector3 rotatePoint = new Vector3(0,0,5);
public void RotateLeft ()
{
transform.RotateAround (rotatePoint, Vector3.up, 90);
}
public void RotateRight ()
{
transform.RotateAround (rotatePoint, Vector3.up, -90);
}
I'm applying each void to a button, and this works like a Final Fantasy Tactics camera - rotate an isometric camera 90 degrees. But it happens instantly, and I want to make it happen over time, like a second or a half a second. I'm super new to programming and I can't find any guides on this or any other posts using google, so I'm asking on here as a last resort. Thanks for any help.