nofriends_1985
08-13-2003, 04:22 PM
Hey,
I have a scene that is setup where i have 2 partical shapes. One partical shape is a goal for the other with a goal weight of (1). Then i have a locator and a expression that works on per partical. If a partical is higher in the y derection than the locator i give the goalPP weight of (0) else i has a goalPP weight of (1). I have a vortex feild in the scene so this gives me a partical by partical pull to the vortex field. Now what i want to do is once a partical is one unit heigher than the locator i want the particals to get pulled to another goal.... This is the expression i wrote to try and do it but because the goalweight is not per partical it doesnt not work what can i do to fix my problem???
-----------------------------Expression-----------------------------------------
vector $particalposition = ParticalsShape1.worldPosition;
if (Locator.translateY < $particalposition.y) {
ParticalsShape1.goalWeight[1] = 0;
ParticalsShape1.goalWeight[0] = 1;
ParticalsShape1.goalPP = 0;
} else if (Locator.translateY + 1 < $particalposition.y) {
ParticalsShape1.goalWeight[0] = 0;
ParticalsShape1.goalWeight[1] = 1;
ParticalsShape1.goalPP = 1;
} else {
ParticalsShape1.goalWeight[1] = 1;
ParticalsShape1.goalWeight[0] = 1;
ParticalsShape1.goalPP = 1;
}
I have a scene that is setup where i have 2 partical shapes. One partical shape is a goal for the other with a goal weight of (1). Then i have a locator and a expression that works on per partical. If a partical is higher in the y derection than the locator i give the goalPP weight of (0) else i has a goalPP weight of (1). I have a vortex feild in the scene so this gives me a partical by partical pull to the vortex field. Now what i want to do is once a partical is one unit heigher than the locator i want the particals to get pulled to another goal.... This is the expression i wrote to try and do it but because the goalweight is not per partical it doesnt not work what can i do to fix my problem???
-----------------------------Expression-----------------------------------------
vector $particalposition = ParticalsShape1.worldPosition;
if (Locator.translateY < $particalposition.y) {
ParticalsShape1.goalWeight[1] = 0;
ParticalsShape1.goalWeight[0] = 1;
ParticalsShape1.goalPP = 0;
} else if (Locator.translateY + 1 < $particalposition.y) {
ParticalsShape1.goalWeight[0] = 0;
ParticalsShape1.goalWeight[1] = 1;
ParticalsShape1.goalPP = 1;
} else {
ParticalsShape1.goalWeight[1] = 1;
ParticalsShape1.goalWeight[0] = 1;
ParticalsShape1.goalPP = 1;
}
