From 9b9e549a5e6dfb7072ca7c2c79f4351734c2e694 Mon Sep 17 00:00:00 2001 From: Dander7BD Date: Thu, 19 Dec 2013 11:57:03 +0100 Subject: [PATCH] bug fix in bool Intersect( const Box &box, const Sphere &sphere, Float4 &worldPointOfContact ) --- Code/OysterPhysics3D/OysterCollision3D.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/OysterPhysics3D/OysterCollision3D.cpp b/Code/OysterPhysics3D/OysterCollision3D.cpp index 00684898..3ef44974 100644 --- a/Code/OysterPhysics3D/OysterCollision3D.cpp +++ b/Code/OysterPhysics3D/OysterCollision3D.cpp @@ -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; }