Expose parry triangle data in ray/shapecasts #648
Labels
A-Spatial-Query
Relates to spatial queries, such as ray casting, shape casting, and intersection tests
C-Enhancement
New feature or request
Currently, raycasts' and shapecasts' "HitData" includes data about the normals, which limits options for some more niche use cases.
I would like to see the Parry ShapeId and/or Vertex data passed through the casting functions into Avian. I can imagine a number of use cases.
In mine, however, I want to be able to determine the backface status of the collided triangle using the CW/CCW test so I can detect and prevent near-wall-collisions on my camera. I think this use case is not particularly niche, but others would be. The change would be especially useful for games using lots of trimeshes.
My use case is not currently possible in pure Avian due to it inheriting the Parry convention that backface collisions return the negative normal of the triangle. This effectively makes it impossible to determine the backface status of a triangle and making them all double sided for the purposes of collision. I don't know the implications of Parry changing that (and am too intimidated to suggest it to them) but either way exposing some of that parry data would make workarounds possible as well as some cool niche functionalities. Painting triangles of meshes by swapping their materials comes to mind as another potential example.
Thanks!
The text was updated successfully, but these errors were encountered: