Quantcast
Channel: Latest Questions by Kristian
Viewing all articles
Browse latest Browse all 14

CapsuleCast consistent error in size

$
0
0
Recently we ran into a problem using capsule cast that we tracked down to what we think might be an error in unity. Consistently our capsule casts would only return true when the collider was well within bounds. The error was pinpointed to be 0.1 in size, no matter the size of the check. In the image below a capsule is cast from the red circle on the right to the red circle in the middle, the radius of the cast is represented by the yellow circle, which is exactly 0.1 greater in radius than the red ones. The green circle was then moved towards the cast until it finally collided, 0.1 distance within the bounds that it should have collided with. ![alt text][1] [1]: http://i.imgur.com/M5iWb.png We've been able to easily replicate it, so I hope there is something obvious that we are doing wrong. P.S. the checks were done with a huge height, and on the same y coordinate, to make sure that it wouldn't be an issue. [edit] P.P.S. if anyone would be interested, a project displaying the discrepancy can be provided. [edit2] Important note, the green capsule is a character collider. It appears to work fine enough for normal colliders. I reduced skin width to 0.0001, but it had no effect.

Viewing all articles
Browse latest Browse all 14

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>