Commit graph

4 commits

Author SHA1 Message Date
PouleyKetchoupp
d8f681029f Support for Dynamic BVH as 2D Physics broadphase
List of changes:
- Modified bvh class to handle 2D and 3D as a template
- Changes in Rect2, Vector2, Vector3 interface to uniformize template
calls
- New option in Project Settings to enable BVH for 2D Physics (enabled
by default like in 3D)
2021-04-30 15:53:15 -07:00
lawnjelly
df18f72384 BVH fix pairing AABB init and mask checks
Fix bug whereby AABBs were reused from previous items due to use of a pool, resulting in missed collisions.
Also use full mask collision checks for all cases except generic update.
2021-01-28 14:01:03 +00:00
lawnjelly
4954a869bb BVH render tree new updating scheme
Change render BVH update scheme from once per update_dirty_instances to a new update_scenarios function called once per draw.

Fix lights not being properly unpaired.
Fixed bug in add_changed_item where AABBs were not being updated due to more than one update per tick.
2021-01-19 14:24:32 +00:00
lawnjelly
690e07b509 Dynamic BVH for rendering and godot physics
Complete rewrite of spatial partitioning using a bounding volume hierarchy rather than octree.

Switchable in project settings between using octree or BVH for rendering and physics.
2021-01-12 12:12:10 +00:00