Rotación de objetos de unidad a lo largo de cualquier eje
using UnityEngine;
public class Rotation : MonoBehaviour
{
public float xAngle, yAngle, zAngle;
public GameObject objectToRotate;
void Awake()
{
//change position here to see object as want
objectToRotate.transform.position = new Vector3(0.1f, 0.0f, 0.0f);
objectToRotate.transform.Rotate(90.0f, 0.0f, 0.0f, Space.Self);
}
void Update()
{
objectToRotate.transform.Rotate(xAngle, yAngle, zAngle, Space.Self);
}
}
M.Bilal Nawaz