+1 vote

I am currently trying to find a way that I can set what time an animation should start in the animation player. I'm using this for a day-night cycle, and I have variables counting what the time of an animation is in seconds. So you switch scenes when you go in or out of buildings, and when you exit a building and it is in the middle of sunset, I want a way to start the sunset animation halfway through. Is there any way I can do this?

in Engine by (37 points)

1 Answer

+2 votes

Have you tried the "advance" method from the AnimationPlayer class ?
For exemple :

YourAnimationPlayer.advance(TimeToShift)
by (177 points)
edited by

I just found that and tried it as you told me. It works perfectly! Thank you!

^^ your welcome

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 Frequently asked questions and 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 [email protected] with your username.