You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
BVH broadphase creates objects with updated AABB to avoid extra checks
When set_static is called on a newly added object, the forced collision check in BVH set_pairable was using an empty AABB, which caused unnecessary collision checks at the origin, then a call to move was checking again at the right position. These changes ensure broadphase objects are added to the BVH tree with proper AABB so collision checks are correctly done right away. Octree & Basic broadphase trees are not affected by these changes.
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) {
|
||||
BroadPhaseSW::ID BroadPhaseBasic::create(CollisionObjectSW *p_object, int p_subindex, const AABB &p_aabb) {
|
||||
|
||||
ERR_FAIL_COND_V(p_object == NULL, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user