Fix uninitialized members in physics query results
This commit is contained in:
parent
69e6d65295
commit
19dee4702a
2 changed files with 10 additions and 10 deletions
|
@ -164,8 +164,8 @@ public:
|
|||
Vector2 normal;
|
||||
RID rid;
|
||||
ObjectID collider_id;
|
||||
Object *collider;
|
||||
int shape;
|
||||
Object *collider = nullptr;
|
||||
int shape = 0;
|
||||
Variant metadata;
|
||||
};
|
||||
|
||||
|
@ -174,8 +174,8 @@ public:
|
|||
struct ShapeResult {
|
||||
RID rid;
|
||||
ObjectID collider_id;
|
||||
Object *collider;
|
||||
int shape;
|
||||
Object *collider = nullptr;
|
||||
int shape = 0;
|
||||
Variant metadata;
|
||||
};
|
||||
|
||||
|
@ -193,7 +193,7 @@ public:
|
|||
Vector2 normal;
|
||||
RID rid;
|
||||
ObjectID collider_id;
|
||||
int shape;
|
||||
int shape = 0;
|
||||
Vector2 linear_velocity; //velocity at contact point
|
||||
Variant metadata;
|
||||
};
|
||||
|
|
|
@ -157,8 +157,8 @@ public:
|
|||
struct ShapeResult {
|
||||
RID rid;
|
||||
ObjectID collider_id;
|
||||
Object *collider;
|
||||
int shape;
|
||||
Object *collider = nullptr;
|
||||
int shape = 0;
|
||||
};
|
||||
|
||||
virtual int intersect_point(const Vector3 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
|
||||
|
@ -168,8 +168,8 @@ public:
|
|||
Vector3 normal;
|
||||
RID rid;
|
||||
ObjectID collider_id;
|
||||
Object *collider;
|
||||
int shape;
|
||||
Object *collider = nullptr;
|
||||
int shape = 0;
|
||||
};
|
||||
|
||||
virtual bool intersect_ray(const Vector3 &p_from, const Vector3 &p_to, RayResult &r_result, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_ray = false) = 0;
|
||||
|
@ -181,7 +181,7 @@ public:
|
|||
Vector3 normal;
|
||||
RID rid;
|
||||
ObjectID collider_id;
|
||||
int shape;
|
||||
int shape = 0;
|
||||
Vector3 linear_velocity; //velocity at contact point
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue