While creating the collision system for my game project I realized that I needed concave polygon shapes to act single sided, i.e. the collision normal returned by a
RayCast is the same no matter which side it hits.
To do this, I decided to use
RayCast.get_collision_shape() to get the specific shape that the ray collided with. If the shape is a concave polygon, then I'll find the face that the ray cast's
collision_point corresponds with. Else I use the regular ol'
Now here's the problem with
get_collision_shape. Instead of returning the shape's index, it gives the index of the triangle of the concave shape. While that saves the time to actually find the triangle, it means that a static body can only have its first shape interacted this way. Is this a bug, or intentional behavior that I'm not aware of?