RotateParticles.cs 453 B

123456789101112131415161718
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class RotateParticles : MonoBehaviour
  5. {
  6. public float rotationSpeed = 1.0f;
  7. private ParticleSystem particles;
  8. void Start()
  9. {
  10. particles = GetComponent<ParticleSystem>();
  11. }
  12. void Update()
  13. {
  14. Quaternion rotation = Quaternion.Euler(0.0f, 0.0f, Time.time * rotationSpeed);
  15. particles.transform.rotation = rotation;
  16. }
  17. }