Search Unity

ControllerColliderHit surface normal

Discussion in 'Editor & General Support' started by cbman, Aug 19, 2008.

  1. cbman

    cbman

    Joined:
    Oct 15, 2007
    Posts:
    23
    What exactly is the surface normal returned in ControllerColliderHit when the hit point is on a triangle edge as in the edge of a stair step? It appears it's simply the normalized vector from the hit point to the capsule's sphere center. I can understand this since it's a tricky case when it's on the edge of two triangles.

    The problem is of course that this normal is not very useful. At least not in my case. If there was a flag telling that the returned normal is this edge normal, it would be really good. Then I could just ignore the normal in this case.

    I really want to see this flag added to the ControllerColliderHit information. It won't help me right now but if I don't come up with some working solution at least at some point I can use that flag to solve the problem.

    Adding it should not be very difficult I'd think.
     
  2. cbman

    cbman

    Joined:
    Oct 15, 2007
    Posts:
    23
    I forgot to ask if my guess about what the surface normal really is in that case is correct.