diff options
author | smix8 <52464204+smix8@users.noreply.github.com> | 2022-12-19 19:01:27 +0100 |
---|---|---|
committer | smix8 <52464204+smix8@users.noreply.github.com> | 2022-12-19 19:31:43 +0100 |
commit | eb88aef537bf7206340e9e64ecf85eb9585ff53b (patch) | |
tree | 1913af34614505e2691d06e990777d9397dbbc55 /modules/gridmap/grid_map.h | |
parent | dcb3754db09b7b8c35aae1fedbc485b91e9f9508 (diff) |
Add GridMap collision_priority
Adds property 'collision_priority' for all physics bodies of the entire GridMap.
Diffstat (limited to 'modules/gridmap/grid_map.h')
-rw-r--r-- | modules/gridmap/grid_map.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/gridmap/grid_map.h b/modules/gridmap/grid_map.h index 02a988935d..59d2936f2c 100644 --- a/modules/gridmap/grid_map.h +++ b/modules/gridmap/grid_map.h @@ -150,6 +150,7 @@ class GridMap : public Node3D { uint32_t collision_layer = 1; uint32_t collision_mask = 1; + real_t collision_priority = 1.0; Ref<PhysicsMaterial> physics_material; bool bake_navigation = false; RID map_override; @@ -185,7 +186,7 @@ class GridMap : public Node3D { return Vector3(p_key.x, p_key.y, p_key.z) * cell_size * octant_size; } - void _reset_physic_bodies_collision_filters(); + void _update_physics_bodies_collision_properties(); void _octant_enter_world(const OctantKey &p_key); void _octant_exit_world(const OctantKey &p_key); bool _octant_update(const OctantKey &p_key); @@ -240,6 +241,9 @@ public: void set_collision_mask_value(int p_layer_number, bool p_value); bool get_collision_mask_value(int p_layer_number) const; + void set_collision_priority(real_t p_priority); + real_t get_collision_priority() const; + void set_physics_material(Ref<PhysicsMaterial> p_material); Ref<PhysicsMaterial> get_physics_material() const; |