mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-27 15:25:54 -04:00
mathutil: Fix scaling BoundingSphere to infinite causing assertions
This error occurs when a BoundingSphere with a large radius is scaled by an even larger radius such that the radius becomes infinite. In this case, the BoundingSphere should be properly marked as infinite so that it behaves properly (and doesn't cause other assertions down the line).
This commit is contained in:
parent
68daa238b1
commit
29cdd78c4e
@ -112,6 +112,10 @@ xform(const LMatrix4 &mat) {
|
||||
|
||||
// Transform the center
|
||||
_center = _center * mat;
|
||||
|
||||
if (cinf(_radius)) {
|
||||
set_infinite();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user