0 votes
value = 100
new value = 200.25
$tween.interpolate_property(self, "value", value, new_value, 2.6, Tween.TRANS_LINEAR, Tween.EASE_IN)

when triggered animation, numbers appear 195.423599 etc
stepify(value,0.01) not help

I want to get only numbers 100.53, 160.62, 195.22 etc

in Engine by (85 points)
edited by

1 Answer

+1 vote
var value = 100

func call_tween(new_value):
    $tween.interpolate_method(self, "set_value", value, new_value, 2.6, Tween.TRANS_LINEAR, Tween.EASE_IN)

func set_value(p_value):
    value = stepify(p_value)
    # do something with value
by (9,736 points)

/del

I solved the problem, the error was quite different. But thanks for the help!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.