I want it to rotate 90 degrees clockwise smoothly every time I click
using UnityEngine;
using System.Collections;
public class PlayerControl : MonoBehaviour
{
public float turnSpeed = 20;
void Update()
{
if (Input.GetMouseButtonDown(0))
{
transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.Euler(0, 0, -90), Time.deltaTime * turnSpeed);
}
}