Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

Curve

Inherits: Resource < RefCounted < Object

A mathematical curve.

Description

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 Y axis and positions points relative to the 0.5 Y position.

See also Gradient which is designed for color interpolation. See also Curve2D and Curve3D.

Properties

int

bake_resolution

100

float

max_value

1.0

float

min_value

0.0

int

point_count

0

Methods

int

add_point ( Vector2 position, float left_tangent=0, float right_tangent=0, TangentMode left_mode=0, TangentMode right_mode=0 )

void

bake ( )

void

clean_dupes ( )

void

clear_points ( )

TangentMode

get_point_left_mode ( int index ) const

float

get_point_left_tangent ( int index ) const

Vector2

get_point_position ( int index ) const

TangentMode

get_point_right_mode (</