Click or drag to resize

Curve2DInterpolate Method

Returns the position between the vertex idx and the vertex idx + 1, where t controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of t outside the range (0.0 >= t <=1) give strange, but predictable results.

If idx is out of bounds it is truncated to the first or last vertex, and t is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0).

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public Vector2 Interpolate(
	int idx,
	float t
)

Parameters

idx
Type: SystemInt32

[Missing <param name="idx"/> documentation for "M:Godot.Curve2D.Interpolate(System.Int32,System.Single)"]

t
Type: SystemSingle

[Missing <param name="t"/> documentation for "M:Godot.Curve2D.Interpolate(System.Int32,System.Single)"]

Return Value

Type: Vector2

[Missing <returns> documentation for "M:Godot.Curve2D.Interpolate(System.Int32,System.Single)"]

See Also