Runtime expression refuses to work

Runtime expression refuses to work

jhulse8HYT4
Explorer Explorer
709 Views
3 Replies
Message 1 of 4

Runtime expression refuses to work

jhulse8HYT4
Explorer
Explorer

I want the particles shown here to change color as their position changes in the scene. I've tried like 50 different scripts and it does nothing.Untitled.jpg

0 Likes
710 Views
3 Replies
Replies (3)
Message 2 of 4

mspeer
Consultant
Consultant

Hi!

 

It's "Shape1" not "Shape.1"

 

 

You may want this at starting point?:

 

vector $pos = nParticleShape1.position;
nParticleShape1.rgbPP = $pos;

particle_color.gif

 

 

 or as you did:

vector $pos = nParticleShape1.position;
nParticleShape1.rgbPP = <<0,$pos.y,0>>;

 

0 Likes
Message 3 of 4

jhulse8HYT4
Explorer
Explorer

That definitely helps. Further question though, I'd like to make the color here a gradient (so red to gray if possible).

 

 Untitled.jpg

0 Likes
Message 4 of 4

mspeer
Consultant
Consultant

Hi!

 

nParticleShape1.rgbPP = <<0,$pos.y,0>>;

This is already a gradient (0,0,0) black to (0,1,0) green.

Sorry, i can't do the work for you.

0 Likes