You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling ChCollisionSystem::RayHit(const ChVector3d& from, const ChVector3d& to, ChCollisionModel* model, ChRayhitResult& result) when using bullet for the collision system leads the the code below being hit. But it doesn't perform the comparison with the desired model correctly.
The code finds all collisions with all models and then afterwards (in lines 386 to 392) finds the collisions that fit the desired model:
But this filtering is using the wrong model pointer. Instead of using rayCallback.m_collisionObject in line 387, rayCallback.m_collisionObject[i] should have been used. Otherwise, only if the last colliding object was the correct object, the correct collisions will be detected.
I hope that someone is able to take this info and turn it into a proper fix (PR) with the corresponding test that the code and test then works correctly.