Merge pull request #45154 from lawnjelly/bvh_fix_setting
Fix BVH physics project setting
This commit is contained in:
commit
ef683e761d
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue