You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fixed unnecessary bvh tree updates when calling set_pairable
Dynamic BVH doesn't update the tree anymore when calling set_pairable with no parameter change. Also modified Godot Physics broadphase to create objects directly with pairable (static) set correctly to make use of this optimization for the BVH broadphase. Note: Octree broadphase doesn't use this optimization because it forces an update on move, so passing the proper AABB and static parameters on creation would cause the tree to update twice.
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
#include "core/list.h"
|
||||
#include "core/print_string.h"
|
||||
|
||||
BroadPhaseSW::ID BroadPhaseBasic::create(CollisionObjectSW *p_object, int p_subindex, const AABB &p_aabb) {
|
||||
BroadPhaseSW::ID BroadPhaseBasic::create(CollisionObjectSW *p_object, int p_subindex, const AABB &p_aabb, bool p_static) {
|
||||
ERR_FAIL_COND_V(p_object == nullptr, 0);
|
||||
|
||||
current++;
|
||||
|
||||
Reference in New Issue
Block a user