Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   Changing radiusPP (https://simplymaya.com/forum/showthread.php?t=14800)

powernemo 22-12-2004 07:33 PM

Changing radiusPP
 
Hi there,

I have this simply excpression but i can't figure what's wrong:

Runtime Expression Before Dynamics mapped on radiusPP of my ParticleShape2 (blobby Surface)
here's :

float $raggio=.05;
if($raggio<.2)
{

$raggio=.05+(time/20);
particleShape2.radiusPP=$raggio;
}

i want my blobbies start from .05 size and grow up 'til .2 but in some case blobbies grow time after time without stopping in other case they won't grow. What's wrong? What's the correct implementation?
thnx

Alan 28-12-2004 02:55 PM

ok you need to do this first:

create a creation expression first (in the same way you made a runtime one) but do this:

//this is your start value
particleShape2.radiusPP == 0.05;

then change your runtime expression to something like this:

//get the value of the radiusPP
float $raggio = particleShape1.radiusPP;

//compare it to the max value you want them to grow to
if($raggio < 1)
{
//add a value on this can be anything you want it to be
$raggio+=0.001;
//set the value of the radiusPP
particleShape1.radiusPP=$raggio;
}

That should work.

:bandit:
Alan

powernemo 29-12-2004 02:14 AM

Yeah! Thanx alot man!!! It works great!!!:tup:

Alan 29-12-2004 12:26 PM

No problem ;)

:bandit:

Alan


All times are GMT. The time now is 03:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018