Ensure ConvexPolygonShape support count variable is initialised
This commit is contained in:
parent
e97cd3d52d
commit
28c7b3a17d
1 changed files with 3 additions and 0 deletions
|
@ -959,6 +959,9 @@ void ConvexPolygonShapeSW::get_supports(const Vector3 &p_normal, int p_max, Vect
|
||||||
const Vector3 *vertices = mesh.vertices.ptr();
|
const Vector3 *vertices = mesh.vertices.ptr();
|
||||||
int vc = mesh.vertices.size();
|
int vc = mesh.vertices.size();
|
||||||
|
|
||||||
|
r_amount = 0;
|
||||||
|
ERR_FAIL_COND_MSG(vc == 0, "Convex polygon shape has no vertices.");
|
||||||
|
|
||||||
//find vertex first
|
//find vertex first
|
||||||
real_t max = 0;
|
real_t max = 0;
|
||||||
int vtx = 0;
|
int vtx = 0;
|
||||||
|
|
Loading…
Reference in a new issue