Is it expected that pair.GetNormal() returns Mathf.Infinity or 0 sometimes? It only happens where ground colliders are overlapping (say box colliders as part of a level).
When this occurs I often get normals that are NaN or 0, and need to know if it’s actually expected from this API.
1 Like
For example:
As the character falls under gravity, it has the potential to have contacts from a nearby slope that intersects the ground slightly so it will get contacts from that, but sets the normal as 0,0,0 or infinite, which is just not useful as a replacement for OnCollisionStay which does not exhibit this behaviour, and makes me suspect it is a potential bug.
As I’m not familiar with Physx contact modifications. I can’t be sure. Obviously a contacts normal of 0,0,0 should never actually happen, right?
2 Likes
Can you explain this in more detailed manner? I mean I don’t fully understand what you have there now. Are you getting contact pairs between the ground colliders or between your character and ground collider?
Can you show the code? I’m not sure how to reproduce what you are saying