This commit is contained in:
corn
2026-06-07 22:59:32 +08:00
commit a62ff7379b
7171 changed files with 10015624 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
using UnityEngine;
namespace TrailsFX.Demos {
public class RotateObject : MonoBehaviour
{
public float speed = 100f;
Vector3 eulerAngles;
void Start ()
{
SetAngles ();
}
void Update ()
{
transform.Rotate (eulerAngles * (Time.deltaTime * speed));
if (Random.value > 0.995f) {
SetAngles ();
}
}
void SetAngles ()
{
eulerAngles = new Vector3 (Random.value - 0.5f, Random.value - 0.5f, Random.value - 0.5f);
}
}
}