mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Fixed raycast bug start x position is NaN
Fixed bug in _castRay when the start x position is NaN.
This commit is contained in:
parent
ad267f0505
commit
1372b4f600
1 changed files with 5 additions and 0 deletions
|
|
@ -1012,6 +1012,11 @@ bool SceneContainer::_castRay( U32 type, const Point3F& start, const Point3F& en
|
||||||
F32 currStartX = normalStart.x;
|
F32 currStartX = normalStart.x;
|
||||||
|
|
||||||
AssertFatal(currStartX != normalEnd.x, "This is going to cause problems in SceneContainer::castRay");
|
AssertFatal(currStartX != normalEnd.x, "This is going to cause problems in SceneContainer::castRay");
|
||||||
|
if(_isnan(currStartX))
|
||||||
|
{
|
||||||
|
PROFILE_END();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
while (currStartX != normalEnd.x)
|
while (currStartX != normalEnd.x)
|
||||||
{
|
{
|
||||||
F32 currEndX = getMin(currStartX + csmTotalBinSize, normalEnd.x);
|
F32 currEndX = getMin(currStartX + csmTotalBinSize, normalEnd.x);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue