Is this a bug ? CollisionBox _v(0) !=0.0f error


It seems when I add a collision box using CollisionBox(Point3(0,0,pz), x,y,z),
the following error appears
self.aimPlaneCN.addSolid(CollisionBox(Point3(self.lookatp[0], self.lookatp[1], self.lookatp[2]), 1e12, 1e12, 1e-12))
AssertionError: _v(0) != 0.0f at line 52 of c:\buildslave\sdk-windows-i386\build\panda\src\mathutil\plane_src.cxx

Point3(0,0,0) works.
Is that a bug?


The problem seems to be that you are setting the height of the CollisionBox too close to zero (1e-12), which the collision system most likely can’t handle.

Replacing the three distances of the sides from the center (which is how “1e12, 1e12, 1e-12” are interpreted) with a single Point3 leads to a completely different CollisionBox (since both points are then considered to be the two diagonally opposite end points of the box).
As such, passing in Point3(0, 0, 0) as the second end point not leading to an error is not inconsistent behaviour, if that is what you meant. It could still error out if the first Point3 has one or more of its components (self.lookatp[0], self.lookatp[1], self.lookatp[2]) set to zero as well, though.