Commit graph

4 commits

Author SHA1 Message Date
lawnjelly
00bd087d82 BVH add support for visibility (activation)
A major feature lacking in the octree was proper support for setting visibility / activation. This meant that invisible objects were still causing lots of processing in the tree unnecessarily.

This PR adds proper support for activation, items are temporarily removed from the tree and collision detection when inactive.
2021-01-30 13:21:40 +00:00
lawnjelly
a241aeb289 Fix BVH set_pairable and masks.
Calling set_pairable now will update collisions (rather than waiting for the next item_move).

Mask behaviour used for pairing now (hopefully) matches octree.
2021-01-17 15:00:49 +00:00
lawnjelly
7b33050b3d BVH - fix physics expecting plus one based IDs.
Godot physics relies on ID zero being invalid, whereas BVH 0 is a valid ID.
2021-01-14 13:26:44 +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