Godot Version
v4.4.1.stable.official [49a5bc7b6]
Question
I’m wondering how everyone is handling the lack of unscaled_time feature in godot.
In my current project, I have:
- UI effects, that needs to use real time (or
unscaled_time) - Timers for 2DNode behaviors that needs to be scaled with game time scale.
- Tweens for 2DNode movements that needs to be scaled with game time scale.
- Animations for 2DNode that needs to be scaled with game time scale.
My current solution is, setting the Engine.time_scale same as game time scale. But I haven’t started on UI effects yet, so I think it’ll mess up that. My UI already has a LineEdit node and the caret blinking is effected by the Engine.time_scale, so it blinks very fast when the game speed is high.
Other solution is, setting a seperate game_speed variable. But then it requires changing/adjusting all other 2DNode timers, tweens and animations when game_speed is changed. It can be notified to the relevant functions by a game_scale_changed signal. And this looks like a big task and probably can cause errors, especially when the functions are in the middle of doing something.
I can’t think of anything else. Any ideas?