diff options
author | George L. Albany <Megacake1234@gmail.com> | 2024-11-27 21:15:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-27 21:15:49 +0000 |
commit | 85d87116e184e7923b8d6804cab2681b61c62d83 (patch) | |
tree | 55ec5bfa061a5c27272b831e697b78ed1b756a70 /scene/3d/physics/collision_shape_3d.h | |
parent | b06d20bf39d15ec736d08d4e4fcb32e0c3c1ce1e (diff) | |
parent | 721f53fde47c2727d99e3ecccdb789a67df36de0 (diff) | |
download | redot-engine-master.tar.gz |
Merge commit godotengine/godot@f128f38
Diffstat (limited to 'scene/3d/physics/collision_shape_3d.h')
-rw-r--r-- | scene/3d/physics/collision_shape_3d.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scene/3d/physics/collision_shape_3d.h b/scene/3d/physics/collision_shape_3d.h index 74f7c16d33..56544806da 100644 --- a/scene/3d/physics/collision_shape_3d.h +++ b/scene/3d/physics/collision_shape_3d.h @@ -45,6 +45,13 @@ class CollisionShape3D : public Node3D { uint32_t owner_id = 0; CollisionObject3D *collision_object = nullptr; +#ifdef DEBUG_ENABLED + Color debug_color = get_placeholder_default_color(); + bool debug_fill = true; + + static const Color get_placeholder_default_color() { return Color(0.0, 0.0, 0.0, 0.0); } +#endif // DEBUG_ENABLED + #ifndef DISABLE_DEPRECATED void resource_changed(Ref<Resource> res); #endif @@ -57,6 +64,13 @@ protected: void _notification(int p_what); static void _bind_methods(); +#ifdef DEBUG_ENABLED + bool _property_can_revert(const StringName &p_name) const; + bool _property_get_revert(const StringName &p_name, Variant &r_property) const; +#endif // DEBUG_ENABLED + + void shape_changed(); + public: void make_convex_from_siblings(); @@ -66,6 +80,14 @@ public: void set_disabled(bool p_disabled); bool is_disabled() const; +#ifdef DEBUG_ENABLED + void set_debug_color(const Color &p_color); + Color get_debug_color() const; + + void set_debug_fill_enabled(bool p_enable); + bool get_debug_fill_enabled() const; +#endif // DEBUG_ENABLED + PackedStringArray get_configuration_warnings() const override; CollisionShape3D(); |