You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +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:
@@ -83,7 +83,7 @@ class BroadPhaseBasic : public BroadPhaseSW {
|
||||
|
||||
public:
|
||||
// 0 is an invalid ID
|
||||
virtual ID create(CollisionObjectSW *p_object, int p_subindex = 0);
|
||||
virtual ID create(CollisionObjectSW *p_object, int p_subindex = 0, const AABB &p_aabb = AABB());
|
||||
virtual void move(ID p_id, const AABB &p_aabb);
|
||||
virtual void set_static(ID p_id, bool p_static);
|
||||
virtual void remove(ID p_id);
|
||||
|
||||
Reference in New Issue
Block a user