bug fix in bool Intersect( const Box &box, const Sphere &sphere, Float4 &worldPointOfContact )

This commit is contained in:
Dander7BD 2013-12-19 11:57:03 +01:00
parent 840f000ec9
commit 9b9e549a5e
1 changed files with 2 additions and 2 deletions

View File

@ -784,9 +784,9 @@ namespace Oyster { namespace Collision3D { namespace Utility
if( Intersect(box, sphere) )
{
Float distance;
Ray ray( sphere.center, box.center - sphere.center );
Ray ray( box.center, sphere.center - box.center );
Intersect( box, ray, distance );
Intersect( sphere, ray, distance );
worldPointOfContact = ray.origin + ray.direction*distance;
return true;
}