diff --git a/ogre2/src/Ogre2RayQuery.cc b/ogre2/src/Ogre2RayQuery.cc index 0ceaee80f..f46c82ede 100644 --- a/ogre2/src/Ogre2RayQuery.cc +++ b/ogre2/src/Ogre2RayQuery.cc @@ -95,11 +95,6 @@ RayQueryResult Ogre2RayQuery::ClosestPoint() { RayQueryResult result; - // ray query using selection buffer does not seem to work on some machines - // using cpu based ray-triangle intersection method - // \todo remove this line if selection buffer is working again - return this->ClosestPointByIntersection(); - #ifdef __APPLE__ return this->ClosestPointByIntersection(); #else diff --git a/src/Utils_TEST.cc b/src/Utils_TEST.cc index 6406bac27..1ab0973b2 100644 --- a/src/Utils_TEST.cc +++ b/src/Utils_TEST.cc @@ -121,6 +121,16 @@ void UtilTest::ClickToScene(const std::string &_renderEngine) root->AddChild(camera); camera->Update(); + // \todo(anyone) + // the centerClick var above is set to a screen pos of (width/2, height/2). + // This is off-by-1. The actual center pos should be at + // (width/2 - 1, height/2 - 1) so the result.X() and result.Y() is a bit off + // from the expected position. However, fixing the centerClick above caused + // the screenToPlane tests to fail so only modifying the pos here, and the + // cause of test failure need to be investigated. + if (_renderEngine == "ogre2") + centerClick = ignition::math::Vector2i(halfWidth-1, halfHeight-1); + // API without RayQueryResult and default max distance result = screenToScene(centerClick, camera, rayQuery, rayResult);