Itoo Software Forum
RailClone => RailClone Pro (*) => Topic started by: arch3d on January 22, 2021, 06:32:40 AM
-
Hello,
Sorry for bother you again,
This time I would like to define Z-Offset for Generator. For minimum (scene units)->0%, for maximum (in scene units as well) ->100%
Thanks
-
Hi
I don't understand what You want to do, anyway You can't plug varying value to Z offset. As far as I understand, it is calculated/evaluated only once.
You need to use segments z offset.
-
If you want to limit input range between 0 > 100% then only one input is enough.
Return
If(input1>100,100,
if(input1<0,0,input1));
If you want to limit input range between min > max as your example then:
Return
If(input3>input2,input2,
if(input3<input1,input1,input3));
-
Rokas i hope screen will explain what i was trynig to do.
Dragan thank you - it works well if i have same units. This time i was trying to do convertion min in cm->0%, max in cm->100%.
-
I am not sure i understand. If I do, then You want to use this expression:
return (Input2-Input1)*Input3/100+Input1;
-
Perfect!
I was looking for this piece of code:)
Thank you