system
1
|
|
|
 |
Attention |
Topic was automatically imported from the old Question2Answer platform. |
 |
Asked By |
rakkarage |
It used to be possible to wait for next frame by doing this?
yield(get_tree(), "idle_frame")
How can i do this in godot4? i tried:
await get_tree().idle_frame
But not work…
Please & Thanks.
4 Likes
system
2
|
|
|
 |
Reply From: |
Geazas |
try await get_tree().process_frame
W 0:00:00:0989 “await” keyword not needed in this case, because the expression isn’t a coroutine nor a signal.
i guess it works, gives a warning, but better then an error idk
thanks
rakkarage | 2022-02-03 15:59
7 Likes
Just wanted to mention, if you need to wait for the next frame to be actually drawn, there is also the option of:
await RenderingServer.frame_post_draw
In my case I needed to do either that or wait 2 process frames sometimes, so it seems cleaner.
1 Like