This commit is contained in:
CortexCore
2023-11-02 20:58:55 +08:00
parent f0f348c246
commit ee3ecec6cb
168 changed files with 58830 additions and 379 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);
}
}
}