using UnityEngine;
public class ObjectRotate : MonoBehaviour
{
public float rotationSpeed = 90f;
private void Update()
{
if (Input.GetKey(KeyCode.LeftArrow))
{
transform.Rotate(Vector3.up, -rotationSpeed * Time.deltaTime);
}
if (Input.GetKey(KeyCode.RightArrow))
{
transform.Rotate(Vector3.up, rotationSpeed * Time.deltaTime);
}
}
}
![](http://code3interactive.com/wp/wp-content/uploads/2021/04/avatar-370-456322-512.png)
Analyst studies emerging trends in the information technology.