I have a mesh collider that is largely a flat plane facing up. Any SphereCast against that surface should return a normal of Vector3(0, 1, 0), but that isn’t always happening. When near an edge on the mesh, the cast will penetrate the face and register the hit against the edge as if it was a corner when it’s really just a polygon edge on a flat surface This is giving me inaccurate hit points and normals.
Hopefully the image above is interpretable. The light blue circle is where the SphereCast should stop and the pink circle is where it seems to be stopping. Instead of hitting the face (horizontal black line) and returning the proper normal (green line), it’s ignoring the face and hitting the tri’s edge (diagonal black line) and returning a lerped normal (red line) as if it were a corner.
Is the SphereCast that inaccurate against mesh colliders, or am I doing something wrong? Is there anything I can do to fix this?
Edit: I’ve added a screenshot to illustrate exactly what’s happening. The black line/sphere are the cast, the green line is what the normal should be, the red line is the normal the SphereCast is returning. The normals differ by as much as 0.05m. The mesh is the default plane mesh. It seems like when the cast hits near a polygon edge, it snaps to the edge, giving an incorrect hit point and normal.
- Creating Marriage at Your Perfect Wedding Ceremony - A Unity Candle at Your Perfect Wedding
- Business and Social Media - When Worlds Collide
- Johnson & Johnson agrees to pay about $117 million to settle U.S. states' mesh probe
- UPDATE 1-J&J agrees to pay about $117 mln to settle U.S. states' mesh probe
- J&J to Pay $117 Million in Nationwide Pact Over Mesh
- Terrifying moment an Illinois cyclist is hit and narrowly avoids being crushed by oblivious six-wheeler driver as he pulled out from a gas station
- Debris crashes down on drivers after truck hits roof of Thorold Tunnel: OPP
- How to Return Serve Against a Serve and Volleyer
- How to Hit For Power in Baseball
- 6 steps to file income tax return online