Merge pull request #15120 from AndreaCatania/gridm
Added layer and mask in the gridmap node
This commit is contained in:
commit
fa9320cfc6
2 changed files with 96 additions and 0 deletions
|
|
@ -136,6 +136,9 @@ class GridMap : public Spatial {
|
|||
OctantKey() { key = 0; }
|
||||
};
|
||||
|
||||
uint32_t collision_layer;
|
||||
uint32_t collision_mask;
|
||||
|
||||
Transform last_transform;
|
||||
|
||||
bool _in_tree;
|
||||
|
|
@ -173,6 +176,7 @@ class GridMap : public Spatial {
|
|||
return Vector3(p_key.x, p_key.y, p_key.z) * cell_size * octant_size;
|
||||
}
|
||||
|
||||
void _reset_physic_bodies_collision_filters();
|
||||
void _octant_enter_world(const OctantKey &p_key);
|
||||
void _octant_exit_world(const OctantKey &p_key);
|
||||
bool _octant_update(const OctantKey &p_key);
|
||||
|
|
@ -210,6 +214,18 @@ public:
|
|||
INVALID_CELL_ITEM = -1
|
||||
};
|
||||
|
||||
void set_collision_layer(uint32_t p_layer);
|
||||
uint32_t get_collision_layer() const;
|
||||
|
||||
void set_collision_mask(uint32_t p_mask);
|
||||
uint32_t get_collision_mask() const;
|
||||
|
||||
void set_collision_layer_bit(int p_bit, bool p_value);
|
||||
bool get_collision_layer_bit(int p_bit) const;
|
||||
|
||||
void set_collision_mask_bit(int p_bit, bool p_value);
|
||||
bool get_collision_mask_bit(int p_bit) const;
|
||||
|
||||
void set_theme(const Ref<MeshLibrary> &p_theme);
|
||||
Ref<MeshLibrary> get_theme() const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue