summaryrefslogtreecommitdiff
path: root/servers/physics_2d/collision_object_2d_sw.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_2d/collision_object_2d_sw.h')
-rw-r--r--servers/physics_2d/collision_object_2d_sw.h25
1 files changed, 10 insertions, 15 deletions
diff --git a/servers/physics_2d/collision_object_2d_sw.h b/servers/physics_2d/collision_object_2d_sw.h
index 55ffa9b1b8..69487631a6 100644
--- a/servers/physics_2d/collision_object_2d_sw.h
+++ b/servers/physics_2d/collision_object_2d_sw.h
@@ -50,32 +50,27 @@ private:
RID self;
ObjectID instance_id;
ObjectID canvas_instance_id;
- bool pickable;
+ bool pickable = true;
struct Shape {
Transform2D xform;
Transform2D xform_inv;
- BroadPhase2DSW::ID bpid;
+ BroadPhase2DSW::ID bpid = 0;
Rect2 aabb_cache; //for rayqueries
- Shape2DSW *shape;
+ Shape2DSW *shape = nullptr;
Variant metadata;
- bool disabled;
- bool one_way_collision;
- real_t one_way_collision_margin;
- Shape() {
- disabled = false;
- one_way_collision = false;
- one_way_collision_margin = 0;
- }
+ bool disabled = false;
+ bool one_way_collision = false;
+ real_t one_way_collision_margin = 0.0;
};
Vector<Shape> shapes;
- Space2DSW *space;
+ Space2DSW *space = nullptr;
Transform2D transform;
Transform2D inv_transform;
- uint32_t collision_mask;
- uint32_t collision_layer;
- bool _static;
+ uint32_t collision_mask = 1;
+ uint32_t collision_layer = 1;
+ bool _static = true;
SelfList<CollisionObject2DSW> pending_shape_update_list;