Godot: Certian editor functionality breaks when Phsyics FPS is 0

Created on 23 Jun 2018  路  12Comments  路  Source: godotengine/godot

Godot version:
3.0.2, 3.0.3, and 3.0.4 all seem affected by this

OS/device including version:
Surface Pro 4, running Windows 10 Home v1709 (Fall Creator's Update)

Issue description:
Setting Physics Process FPS in the project settings to 0 or lower causes issues, both in the game and in the editor. Notable issues I noticed:

  • Cannot close the editor or game without closing the console window attached to those
  • While the Project Settings window appears, the actual settings list never appear, making it impossible to edit settings. Same goes for Editor Settings.
  • Quit to Project List sort of works. It brings up the project list as normal, but the editor that was supposed to quit, does not.

There may be other issues that I haven't noticed. My intent with setting its FPS to 0 is to prevent the physics system from running at all, as I'm building a tool which won't need physics, and so it'd be a waste of CPU usage to leave it on, even at 1 FPS.

Out of curiousity, I set the Physics FPS to 1, and it appears that the things I described above will happen at the physics framerate. I'm not sure why they happen when a physics frame comes and not just immediately, but...

Steps to reproduce:

  1. Open up any existing project or create a new one.
  2. Once the editor loads, go to Project Settings -> Physics -> Common and set the Physics Process FPS to 0.
  3. Save the project and quit.
  4. Reopen the editor, and reload the project.
  5. The issue occurs, as described above.

To fix the issue, just in case you're affected by this:

  1. Open up your project's project.godot file.
  2. Look for the [physics] section.
  3. The key you're looking for is common/physics_fps. Either set that back to where you want it, or delete it to default to 60 Physics FPS.

Minimal reproduction project:
Bug Report - Physics FPS 0 causes editor glitches.zip

bug editor

Most helpful comment

Also add, a check parameter to set physics on / off would be good

All 12 comments

I looked through the PhysicsServer documentation, and it seems the appropriate way to disable the physics is PhysicsServer.set_active(false)? However it seems that doesn't disable _physics_process(delta) in a 2D game, and the documentation even seems to mention that it only sets it for the 3D physics engine, not the 2D one.

Found out that Quit to Project List sort of works. It brings up the project list as normal, but the editor that was supposed to quit, does not.

i dont think setting this to 0 should work. For disabling 2D, you call Physics2DServer.set_active(false)

@reduz That still doesn't fix the issues it causes in the editor... which was what I was mainly making this issue for.

Could this be re-opened? This is about some bugs in the editor that setting Physics Process FPS to 0 causes.

Set PhysFPS to 0 is not wanted. To deactivate the space use the proper function please.

I need to implement proper property hints in the project settings (like in the inspector).

Yes that's a good solution

Also add, a check parameter to set physics on / off would be good

Moving to 3.2 since it's a feature request

It's not really a feature request, so much as what I perceive to be a bug with how the editor works... but whatever.

Can't say I'm not a little annoyed, though.

After some discussion on IRC (2019-04-18 from 11:20), I think would be better to retag this as a bug.
The reasoning is that project settings should not cause issues in the editor.

Was this page helpful?
0 / 5 - 0 ratings