Add GridMap collision_priority
Adds property 'collision_priority' for all physics bodies of the entire GridMap.
This commit is contained in:
parent
dcb3754db0
commit
eb88aef537
3 changed files with 26 additions and 4 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue