Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Just commenting as a sanity check: Is all your simulation logic done during _physics_process? If any part is in _process, maybe the non-determinism is due to minor timing changes since _process has no guarantees that it runs on a consistent time step.

The actual physics processing is done in _integrate_forces, but I set the flags to turn thrust on/off outside of that. I think this is where the discrepancy in the time-step is causing me problems.

I switched from 'add_constant_central_force()' to 'apply_central_impulse()' and it appears to have fixed it, but now I need to figure out how to integrate the "burn duration" slider back in. (it was just an await() to reset the constant force, but I didn't want to move that into _integrate_forces())

Looks like I have some refactoring to do now.

Thanks for your help!

You're awaiting a scene tree timer https://docs.godotengine.org/en/stable/classes/class_scenetree.html#class-scenet... ? If so, having the timer run with process_in_physics set to true should be enough then. Since the physics ticks are on a fixed time step.

Yup, that fixed it. Saved me having to rework the sliders. Thanks.