summaryrefslogtreecommitdiffstats
path: root/modules/gridmap/grid_map.h
diff options
context:
space:
mode:
authorJFonS <JFonS@users.noreply.github.com>2022-01-06 13:28:42 +0100
committerGitHub <noreply@github.com>2022-01-06 13:28:42 +0100
commit1f0dc026491539ed07f144e0aad29cdfeaa5f66d (patch)
treeda65a597eb2897b7d1a659a56ecc21d336f7acbb /modules/gridmap/grid_map.h
parent8e2398207cb5b1c7a50e0bff0ecf131bc94d7cae (diff)
parent59a9b2192eb1287c4ec2fc99397903199b19df9a (diff)
downloadredot-engine-1f0dc026491539ed07f144e0aad29cdfeaa5f66d.tar.gz
Merge pull request #56006 from KoBeWi/6yearslater
Add physics material to GridMap
Diffstat (limited to 'modules/gridmap/grid_map.h')
-rw-r--r--modules/gridmap/grid_map.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/gridmap/grid_map.h b/modules/gridmap/grid_map.h
index db3395b6fe..546b530148 100644
--- a/modules/gridmap/grid_map.h
+++ b/modules/gridmap/grid_map.h
@@ -38,6 +38,8 @@
//heh heh, godotsphir!! this shares no code and the design is completely different with previous projects i've done..
//should scale better with hardware that supports instancing
+class PhysicsMaterial;
+
class GridMap : public Node3D {
GDCLASS(GridMap, Node3D);
@@ -134,6 +136,7 @@ class GridMap : public Node3D {
uint32_t collision_layer = 1;
uint32_t collision_mask = 1;
+ Ref<PhysicsMaterial> physics_material;
bool bake_navigation = false;
uint32_t navigation_layers = 1;
@@ -223,6 +226,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_physics_material(Ref<PhysicsMaterial> p_material);
+ Ref<PhysicsMaterial> get_physics_material() const;
+
void set_bake_navigation(bool p_bake_navigation);
bool is_baking_navigation();