The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

I don't using any physics in project - no Area2D or KinematicBody and want to delete all unneeded from export template. Especially any physics to make lighter native lib .
I commenting unused modules, builtins and classes in
And so it works.

But when I try to commenting any unused servers: arvr, physics, physics_2d then get crash so something use it.

When I run profiler it shows Physics Frame Time is about 0.01666 and Physics_2d 1 call per any frame.

How to disable any physics in project and better way exclude it from template build?

in Engine by (36 points)
edited by

1 Answer

+1 vote
Best answer

If you go commenting out classes manually then there is no official guarantee your export will work. The way it's supposed to be done is, you disable modules in your SCons command (and of course have the export templates built yourself too). If the doc don't show how to turn off 2D physics you might need to do a request for it to be supported.

I don't think server APIs are supposed to be removed, what usually happens is, they get replaced with a dummy version that does nothing, because otherwise you would have to go through the tedious task of commenting out all calls to them through the codebase. That's quite bad if you want to sync up with upstream Godot afterwards. But again, if you want this officially, better go ask for the feature (or PR it, if you can get it to work).

Physics Frame Time is about 0.01666

That precise value really looks like a report of delta time, not the actual time physics takes to process. Physics should have zero impact on CPU if you don't use any.

by (29,360 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.