gododo
January 25, 2026, 4:40am
1
Godot Version
4.5
Question
So now I know how to get y position of a curve point.
particles.scale_curve_y.get_point_position(0).y
How do I tween it? I tried many ways to write something like this but all gives out errors.
on_timer_timeout()
var tween = get_tree().create_tween()
tween.tween_property(particles.scale_curve_z,"set_point_value:y", 0.0, 0.5)
Error: start with no tween / tween property does not exist.
You may have to use tween_method with a bind for the index
tween.tween_method(particles.scale_curve_z.set_point_value.bind(0), 1.0, 0.0, 0.5)
3 Likes
gododo
January 25, 2026, 6:44am
3
I couldn’t get your code to work. It just abruptly set value to 0.0 without tweening.
var tween = get_tree().create_tween()
tween.tween_method(beam_particles.scale_curve_y.set_point_value.bind(0), 1.0, 0.0, 0.1)
but I found simpler (but hacky) solution just using scale.
var tween = get_tree().create_tween()
tween.tween_property(particles,"scale", Vector3(0.1,0.1,0.1),0.1)
It would be nice to know how to tween scale_curve though.
You need to tween your own function which in turn calls set_point_value()
2 Likes
gododo
January 25, 2026, 7:19am
5
I did try that but not successful.
var tween = get_tree().create_tween()
tween.tween_method(_twset.bind(0), 1.0, 0.1, 0.1)
func _twset(a):
#particles.scale_curve_y.set_point_value(a, 0.0)
particles.scale_curve_y.set_point_position(a).y = 0.0
error expect 1 arg but called 2
Look at the reference for tween_method()
The first argument that the engine will internally bind to the call is the interpolated (from, to) value. So if you bind an additional argument yourself, the tweened function will need to have 2 arguments. To better understand how it works, try this simple test:
var tween = create_tween()
tween.tween_method(foo, 0.0, 1.0, 1.0)
func foo(parameter):
print(parameter)
3 Likes
gododo
January 25, 2026, 11:11pm
7
I think I got it. Thank you for explanation
var tween = get_tree().create_tween()
tween.tween_method(_twset.bind(0), 0.1, 0.0, 0.1)
func _twset(a,b):
print(a)
print(b)
beam_particles.scale_curve_y.set_point_value(b, a)
beam_particles.scale_curve_z.set_point_value(b, a)
1 Like