mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 18:11:13 +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:
parent
de3168ffa3
commit
0dacc681b6
11 changed files with 30 additions and 24 deletions
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue