Ray casting breaks breaks when time dilation is set to 0
C-BugA-Spatial-QueryD-StraightforwardS-Ready-For-Implementation
In my game, I support pausing. When the game is paused, time dilation is set to 0, so everything freezes. `FixedUpdate` doesn't run.
However, users can still move objects during pause.
To pick objects, I use Avian, and I'd like to keep it functional during pause. Just for testing, I set the Avian schedule to `PostUpdate`, but it still breaks. In the video, you can see that I can move objects freely while the game is unpaused. But once I pause the game, I can move any object only once. After that, hovering over the object does nothing (you can normally see a white outline when the object is hovered).
https://github.com/user-attachments/assets/a3b68134-e81f-41ad-95b4-217f2166213e
The behavior on the be fixed by adding `update_moved_collider_aabbs` to `PostUpdate` manually.
However, I noticed that `RayCast` is still broken because its global direction is not update. The video above works only because it uses picking.
It would be nice to properly support use cases like this.
关闭于 2026-04-15 4 条评论