LoneRobot
09-01-2006, 01:08 PM
im trying to get the expression controller to check for two rotational variables but cant figure out how to phrase it.
Im reading the rotation of an object via a scalar called "Zrot" which is assigned to an x rotation controller in my scene.
i want it to operate by doing no rotation when the rotation is between the values -0.1 and +1.0. after that, i want it to start rotating exactly 50% of the rotation of the assigned object.
my problem is that in MXS i could do multiple if/then/else statements. in the expression controller it is slightly different. the two statements that work are as follows -
if (Zrot>-0.1,0,(Zrot+0.1)*0.5) for the down rotation, stationary until -0.1 and then at 50% after, and :
if (Zrot<0.1,0,(Zrot-0.1)*0.5) for the up rotation, stationary until +0.1 and then at 50% after.
is there a way to combine the two statements in the expression controller?
Im reading the rotation of an object via a scalar called "Zrot" which is assigned to an x rotation controller in my scene.
i want it to operate by doing no rotation when the rotation is between the values -0.1 and +1.0. after that, i want it to start rotating exactly 50% of the rotation of the assigned object.
my problem is that in MXS i could do multiple if/then/else statements. in the expression controller it is slightly different. the two statements that work are as follows -
if (Zrot>-0.1,0,(Zrot+0.1)*0.5) for the down rotation, stationary until -0.1 and then at 50% after, and :
if (Zrot<0.1,0,(Zrot-0.1)*0.5) for the up rotation, stationary until +0.1 and then at 50% after.
is there a way to combine the two statements in the expression controller?
