Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Some raycasts on capsule collider return an incorrect hit result.

Discussion in 'Physics' started by exerion, Aug 10, 2015.

  1. exerion

    exerion

    Joined:
    Jun 29, 2011
    Posts:
    54
    Just incase you are getting errors when raycasting against a capsule collider...

    Capsule-Collider-Error.jpg

    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.
     

    Attached Files:

    Last edited: May 2, 2016
    Pigeon Coop likes this.
  2. Pigeon Coop

    Pigeon Coop

    Joined:
    Jan 17, 2014
    Posts:
    186
    Yeah, so, this is a pretty big problem you guys.
     
  3. exerion

    exerion

    Joined:
    Jun 29, 2011
    Posts:
    54
    This bug was reported 6 months ago, has been reproduced by Unity and still hasn't been fixed :(