Some raycasts on capsule collider return an incorrect hit result.

Just incase you are getting errors when raycasting against a capsule collider…

1. What happened…
Some raycasts on capsule collider return an incorrect hit result. This error occurs regardless of whether the ray origin is inside (green) or outside (red) the collider. In this image we’re only drawing the incorrect raycast hit results.

2. How we can reproduce it using the example you attached…
Hit play to see. Thousands of raycast are being fired from the red and green gizmos. The red/green lines are the raycast errors, you can see where the raycast are hitting the inside of the collider. The white/cyan lines are the raycast hit normals.

http://fogbugz.unity3d.com/default.asp?718712_oh5icmpnnd2rdfoj

An example Unity package is attached.

2243412–149787–Capsule-Collider-Error.unitypackage (19.2 KB)

1 Like

Yeah, so, this is a pretty big problem you guys.

This bug was reported 6 months ago, has been reproduced by Unity and still hasn’t been fixed :frowning: