I ran into an issue when trying to raycast against triggers. The raycast works fine as long as I don’t use the collideWith filter. However, as soon as I define that, the raycast no longer collides with the triggers, even if all the filters line up.
It seems like shouldHitTriggers is always set to false. It’s very odd that a raycast without a collideWith mask hits a trigger then. I just tested locally by reimplementing the functionality and raycasting with shouldHitTriggers=true, and it works like expected.
Is it possible that you could include a configuration option in the raycast query so we can make raycasts that hit triggers aswell. It seems a little odd to leave it out, especially when it is not mentioned in the documentation.