diff --git a/test/unit_test/perception/Obstalce.tests.js b/test/unit_test/perception/Obstalce.tests.js index 3ebcd935..787e1531 100644 --- a/test/unit_test/perception/Obstalce.tests.js +++ b/test/unit_test/perception/Obstalce.tests.js @@ -43,13 +43,15 @@ describe( 'Obstacle', function () { const geometry = new MeshGeometry( vertices, indices ); const obstacle = new Obstacle( geometry ); const intersectionPoint = new Vector3(); + const normal = new Vector3(); const ray = new Ray( new Vector3( 0.5, 1, 0.5 ), new Vector3( 0, - 1, 0 ) ); - const result = obstacle.intersectRay( ray, intersectionPoint ); + const result = obstacle.intersectRay( ray, intersectionPoint, normal ); expect( result ).not.to.be.null; expect( intersectionPoint ).to.deep.equal( { x: 0.5, y: 0, z: 0.5 } ); + expect( normal ).to.deep.equal( { x: 0, y: 1, z: 0 } ); } ); @@ -60,13 +62,15 @@ describe( 'Obstacle', function () { const geometry = new MeshGeometry( vertices ); const obstacle = new Obstacle( geometry ); const intersectionPoint = new Vector3(); + const normal = new Vector3(); const ray = new Ray( new Vector3( 0.5, 1, 0.5 ), new Vector3( 0, - 1, 0 ) ); - const result = obstacle.intersectRay( ray, intersectionPoint ); + const result = obstacle.intersectRay( ray, intersectionPoint, normal ); expect( result ).not.to.be.null; expect( intersectionPoint ).to.deep.equal( { x: 0.5, y: 0, z: 0.5 } ); + expect( normal ).to.deep.equal( { x: 0, y: 1, z: 0 } ); } );