unity 3d student

Beginner B23 – Particle Systems

Creating a simple explosion using a particle system instantiated from a prefab.

Code Used (Javascript)

var stars : ParticleEmitter;
  1.  
  2. function OnCollisionEnter (col : Collision) {
  3.  Instantiate(stars, transform.position, transform.rotation);
  4.  Destroy(gameObject);
  5. }

Further Reading

Share via Social Media

  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • Add to favorites

31 Comments