How to set CPUparticles Curve Point position by code?

Godot Version

4.5

Question

How do I manipulate CPUparticles.scale_curve_y’s point (0) positions by code?

:backhand_index_pointing_up: manipulate these Position x,y values?

Something like this (pseudo code):


On_button_pressed():
my_current_curve.scale_curve_y.set_point_position(0, Vector2(0.0,1.0)
On_button_released():
my_current_curve.scale_curve_y.set_point_position(0, Vector2(0.0,0.0)

Read the class reference for each object used and see what properties you need to access on each.

1 Like

Thanks, I was wrongly looking at Curve2D reference with set_point_position.

This is the solution using Curve reference with set_point_value.

CPUParticles3D.scale_curve_z.set_point_value(0, 10.05)