diff --git a/main/main.cpp b/main/main.cpp index d02f75b30b1..1bbf44437f1 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -170,6 +170,10 @@ static String get_full_version_string() { // FIXME: Could maybe be moved to PhysicsServerManager and Physics2DServerManager directly // to have less code in main.cpp. void initialize_physics() { + + // This must be defined BEFORE the 3d physics server is created + GLOBAL_DEF("physics/3d/godot_physics/use_bvh", true); + /// 3D Physics Server physics_server = PhysicsServerManager::new_server(ProjectSettings::get_singleton()->get(PhysicsServerManager::setting_property_name)); if (!physics_server) { diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp index 972bbb2485a..1099852098f 100644 --- a/scene/resources/world.cpp +++ b/scene/resources/world.cpp @@ -335,10 +335,6 @@ void World::_bind_methods() { World::World() { - // These defaults must be created BEFORE creating the scenario, because the BVH reads - // the defaults at that point. - GLOBAL_DEF("physics/3d/godot_physics/use_bvh", true); - space = PhysicsServer::get_singleton()->space_create(); scenario = VisualServer::get_singleton()->scenario_create();