summaryrefslogtreecommitdiff
path: root/scene/2d/collision_shape_2d.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/collision_shape_2d.h')
-rw-r--r--scene/2d/collision_shape_2d.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/scene/2d/collision_shape_2d.h b/scene/2d/collision_shape_2d.h
index 8a4d885393..695d0c6657 100644
--- a/scene/2d/collision_shape_2d.h
+++ b/scene/2d/collision_shape_2d.h
@@ -39,13 +39,13 @@ class CollisionObject2D;
class CollisionShape2D : public Node2D {
GDCLASS(CollisionShape2D, Node2D);
Ref<Shape2D> shape;
- Rect2 rect;
- uint32_t owner_id;
- CollisionObject2D *parent;
+ Rect2 rect = Rect2(-Point2(10, 10), Point2(20, 20));
+ uint32_t owner_id = 0;
+ CollisionObject2D *parent = nullptr;
void _shape_changed();
- bool disabled;
- bool one_way_collision;
- float one_way_collision_margin;
+ bool disabled = false;
+ bool one_way_collision = false;
+ real_t one_way_collision_margin = 1.0;
void _update_in_shape_owner(bool p_xform_only = false);
@@ -69,8 +69,8 @@ public:
void set_one_way_collision(bool p_enable);
bool is_one_way_collision_enabled() const;
- void set_one_way_collision_margin(float p_margin);
- float get_one_way_collision_margin() const;
+ void set_one_way_collision_margin(real_t p_margin);
+ real_t get_one_way_collision_margin() const;
virtual String get_configuration_warning() const override;