Skip to content

dt in Value Tracker fails #3993

Answered by uwezi
Pasquale19 asked this question in Q&A
Nov 2, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

dt is the time difference between the current and the previous frame. It is equal to 1/framerate.

With value_tracker1.add_updater(lambda m,dt: m.set_value(dt)) you are setting the value of the value tracker to the value dt over and over again. Try value_tracker1.add_updater(lambda m,dt: m.increment_value(dt)) for a cumulative updating...

Over on Discord I could have directly demonstrated this in a live code example...
https://docs.manim.community/en/stable/faq/general.html?highlight=discord#where-can-i-find-more-resources-for-learning-manim

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Pasquale19
Comment options

Answer selected by Pasquale19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants