Rasagar/Library/PackageCache/com.unity.visualeffectgraph/Documentation~/Operator-Remap.md
2024-08-26 23:07:20 +03:00

3.5 KiB
Raw Permalink Blame History

Remap (Remap)

Menu Path : Operator > Math > Remap > Remap

The Remap Operator linearly remaps input values from an old range to a new range, with an optional clamp.

This Operator accepts input values of various types. You can compare the input to a minimum and maximum value of the same type, or compare it to a float value. For the list of types this Operator can use, see Available Types.

Operator settings

Setting Type Description
Clamp bool Clamps the input value between NewRangeMin and NewRangeMax.

Operator properties

Input Type Description
Input Configurable The value this Operator evaluates.
OldRangeMin Configurable The lower bound of the input range. If you enable Clamp, this value must be less than OldRangeMax
The Type can be float or the same as Input.
OldRangeMax Configurable The upper bound of the input range. If you enable Clamp, this value must be greater than OldRangeMin.
The Type can be float or the same as Input.
NewRangeMin Configurable The lower bound of the output range. If Input is the same as OldRangeMin, the Operator outputs this value.
The Type can be float or the same as Input.
NewRangeMax Configurable The upper bound of the output range. If Input is the same as OldRangeMax, the Operator outputs this value.
The Type can be float or the same as Input.
Output Type Description
Output Dependent The remapped value.
The Type changes to match the Input type.

Operator configuration

To view the Operators configuration, click the cog icon in the Operators header.

Input Description
Input The value type for the Input port and Output value. For the list of types this property supports, see Available types.
OldRangeMin The value type for the OldRangeMin port. For the list of types this property supports, see Available types.
OldRangeMax The value type for the OldRangeMax port. For the list of types this property supports, see Available types.
NewRangeMin The value type for the NewRangeMin port. For the list of types this property supports, see Available types.
NewRangeMax The value type for the NewRangeMax port. For the list of types this property supports, see Available types.

Available types

You can use the following types for your Input values and Output ports:

  • Float
  • Vector2
  • Vector3
  • Vector4
  • Direction
  • Position
  • Vector