How is the direction specified?
I've done similar things in the past with a bit of trigonometry.
Basically add a VertexCreator in add point mode with the X value being the X0 + Distance*cos(Angle)
and the Y value being Y0 + Distance*sin(Angle).
where the Angle is in radians and measured counterclockwise from the positive x axis. (East)
if your heading is measured clockwise from the positive y axis (North) ie azimuth, you will need to convert using the formula
angle =mod(450?azimuth, 360) and then convert degrees to radians.
I've done similar things in the past with a bit of trigonometry.
Basically add a VertexCreator in add point mode with the X value being the X0 + Distance*cos(Angle)
and the Y value being Y0 + Distance*sin(Angle).
where the Angle is in radians and measured counterclockwise from the positive x axis. (East)
if your heading is measured clockwise from the positive y axis (North) ie azimuth, you will need to convert using the formula
angle =mod(450?azimuth, 360) and then convert degrees to radians.
Note that this works best in a cartesian coordinate system. If you are working in lat/long over large distances, the math becomes more complicated and involves the law of haversine.
I would create the line using the vertex creator to add 20m to the y coordinate and then rotate (presuming your heading is set in degrees) using the original x y as the origin
How is the direction specified?
The direction is specified as azimuth(from -180 to 180)
You'll need to do a bit of work to the heading to use the rotator
For example
If the direction is specified by an angle (azimuth), the excellent solutions provided by @jdh and @egomm can be applied. I would try @egomm's approach with this workflow.
A different approach:
You can also accomplish this using only a GeometryReplacer, with some trigonometry thrown in to build a WKT string (Well Known Text).
The Geometry Source field contains this formula:
LINESTRING (@XValue() @YValue(), @Evaluate(@XValue() + (@Value(Distance) * sin(@degToRad(@Value(Azimuth))))) @Evaluate(@YValue() + (@Value(Distance) * cos(@degToRad(@Value(Azimuth))))))