Fix BVH physics project setting
Move the GLOBAL_DEF for the `godot_physics/use_bvh` to occur before GLOBAL_GET. This prevents a warning occurring and the selection not being used.
This commit is contained in:
parent
8f265e8c0b
commit
b5edbe0301
2 changed files with 4 additions and 4 deletions
|
@ -170,6 +170,10 @@ static String get_full_version_string() {
|
||||||
// FIXME: Could maybe be moved to PhysicsServerManager and Physics2DServerManager directly
|
// FIXME: Could maybe be moved to PhysicsServerManager and Physics2DServerManager directly
|
||||||
// to have less code in main.cpp.
|
// to have less code in main.cpp.
|
||||||
void initialize_physics() {
|
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
|
/// 3D Physics Server
|
||||||
physics_server = PhysicsServerManager::new_server(ProjectSettings::get_singleton()->get(PhysicsServerManager::setting_property_name));
|
physics_server = PhysicsServerManager::new_server(ProjectSettings::get_singleton()->get(PhysicsServerManager::setting_property_name));
|
||||||
if (!physics_server) {
|
if (!physics_server) {
|
||||||
|
|
|
@ -335,10 +335,6 @@ void World::_bind_methods() {
|
||||||
|
|
||||||
World::World() {
|
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();
|
space = PhysicsServer::get_singleton()->space_create();
|
||||||
scenario = VisualServer::get_singleton()->scenario_create();
|
scenario = VisualServer::get_singleton()->scenario_create();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue