x


Create Particle System on click of another object

So, I have a cube that acts as a button. I'm trying to figure out how to create a particle system at a particular location (or activate one, that would be easier) with a click of that cube. Here's my code so far, I don't know what to do to create/activate the particle system.

function OnMouseOver() { //Make sure mouse is over the object

if(Input.GetMouseButtonDown(0)) //Make sure the object is clicked on

So, What do I do next?

Additional info: I've checked a lot of posts but i can't find anything.

more ▼

asked Aug 12 '12 at 07:04 PM

Sausagesauce gravatar image

Sausagesauce
18 4 6 9

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Build a ParticleSystem and use functions from the Script Reference to make it do. Instantiate it when the button is pressed, or child it to the button and just turn it on, depending on your needs.

more ▼

answered Aug 12 '12 at 07:43 PM

Loius gravatar image

Loius
10.9k 1 12 43

Now how would i do that? I'm new to javascript.

Aug 19 '12 at 08:25 PM Sausagesauce

I think i have it actually! Thanks!

Aug 19 '12 at 08:28 PM Sausagesauce
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x335
x232
x209
x146
x46

asked: Aug 12 '12 at 07:04 PM

Seen: 702 times

Last Updated: Aug 19 '12 at 08:28 PM