Sounds like it could be a bug or there should be another function that returns the shape’s index rather than the triangle index. According to the documentation, get_collider_shape
is supposed to return “... the shape ID of the first object that the ray intersects ...”. To me this implies that the function returns an ID for the shape, not an ID for a triangle. Maybe the functionality changed but the documentation wasn’t updated?
I wonder if the using DirectSpaceState gives the same results or not.
It might be worth opening a bug report on GitHub, or maybe a feature request on the proposal library if it is intended functionality.