Our support site has moved to https://support.intuiface.com

Linear Converter

    Description

    The Linear Converter Interface Asset enables you to convert a numeric value located within an input range into a value located within an output range. (For example, converting Celsius into Fahrenheit.) This is achieved through the use of a linear equation. Thankfully, IntuiFace does the math for you! Just provide two conversion examples. These two examples are equivalent to two points on the line representing the linear equation.

    You will find usage samples below.

    Properties

    • Sample Input A: input value for the first conversion
    • Sample Output A: output value of the first conversion
    • Sample Input B: input value for the second conversion
    • Sample Output B: output value of the second conversion

    New since v4.8.6

    • Limit to lower end of Output: applies a threshold if the output value were to go below the lower end of the output range.
    • Limit to upper end of Output: applies a threshold if the output value were to go over the upper end of the output range.

    Usage samples

    Convert Celsius into Fahrenheit

    • Sample Input A: 0
    • Sample Output A: 32
    • Sample Input B: 20
    • Sample Output B: 68

    Because 0°C = 32°F and 20°C = 68°F, this linear conversion will transform Celsius into Fahrenheit. Reverse the input and output values to create a Fahrenheit to Celsius converter.

    Create a parallax effect when moving an image

    • Sample Input A: 0
    • Sample Output A: - 400
    • Sample Input B: 1920
    • Sample Output B: 2320

    Create 2 images:

    • Use the X property of Image 1 as the source value. This is the foreground image and will be the one moved by a user.
    • Output the transformed value to the X property of Image 2. This image is in the background.

    When you move Image 1, its X property will be processed by the converter and the Output value will be used by Image 2. The background image will move faster than the foreground image.

    Play with the Sample Output parameters to adjust the speed / difference of movement.

    Follow an object until a certain point

    • Sample Input A: 0
    • Sample Output A: 0
    • Sample Input B: 960
    • Sample Output B: 960
    • Limit to upper end of Output: checked

    The X property of the koala image is bound to the X property of the penguin image using this linear converter. the [0, 960] input range and [0, 960] output range means the X values will be equals, thus the koala image will follow the penguin image when moved.

    Linear_Converter.jpg

    The Limit to upper end of Output checked property means the X value of the koala image will be blocked when reaching 960.

    Linear_Converter-2.jpg