mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-19 06:33:49 +00:00
raycast division safety - corrects issues with awesomium and the guionobject resources relating to WYSIWYG casts.
This commit is contained in:
parent
963ef1ecdb
commit
c67ba876d0
1 changed files with 6 additions and 1 deletions
|
|
@ -1630,7 +1630,12 @@ bool TSMesh::castRayOpcode( const Point3F &s, const Point3F &e, RayInfo *info, T
|
|||
}
|
||||
|
||||
// slerp
|
||||
Point3F s = ( (max - min) - (facePoint - min) ) / (max - min);
|
||||
Point3F divSafe = (max - min);
|
||||
if (divSafe.x == 0.0f) divSafe.x = POINT_EPSILON;
|
||||
if (divSafe.y == 0.0f) divSafe.y = POINT_EPSILON;
|
||||
if (divSafe.z == 0.0f) divSafe.z = POINT_EPSILON;
|
||||
|
||||
Point3F s = ( (max - min) - (facePoint - min) ) / divSafe;
|
||||
|
||||
// compute axis
|
||||
S32 bestAxis = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue