A mathematical curve.
This resource describes a mathematical curve by defining a set of points and tangents at each point. By default, it ranges between 0 and 1 on the X and Y axes, but these ranges can be changed.
Please note that many resources and nodes assume they are given unit curves. A unit curve is a curve whose domain (the X axis) is between 0 and 1. Some examples of unit curve usage are CPUParticles2D.angle_curve and Line2D.width_curve.
The maximum value (y-coordinate) that points can have. Tangents can cause higher values between points.
The minimum value (y-coordinate) that points can have. Tangents can cause lower values between points.
The left TangentMode for the point at index.
Note: index is a value in the 0 .. point_count - 1 range.
The left tangent angle (in degrees) for the point at index.
Note: index is a value in the 0 .. point_count - 1 range.
The right TangentMode for the point at index.
Note: index is a value in the 0 .. point_count - 1 range.
The right tangent angle (in degrees) for the point at index.
Note: index is a value in the 0 .. point_count - 1 range.
Adds a point to the curve. For each side, if the *_mode is TANGENT_LINEAR, the *_tangent angle (in degrees) uses the slope of the curve halfway to the adjacent point. Allows custom assignments to the *_tangent angle if *_mode is set to TANGENT_FREE.
Removes duplicate points, i.e. points that are less than 0.00001 units (engine epsilon value) away from their neighbor on the curve.
Returns the left TangentMode for the point at index.
Returns the right TangentMode for the point at index.
Returns the Y value for the point that would exist at the X position offset along the curve using the baked cache. Bakes the curve's points if not already baked.
Sets the left TangentMode for the point at index to mode.
Sets the right TangentMode for the point at index to mode.