Search Unity

unity20192.5f1, Physics.Linecast could not hit the rigidbody+collider?

Discussion in 'Physics' started by kbengine, Oct 4, 2019.

  1. kbengine

    kbengine

    Joined:
    Jun 20, 2019
    Posts:
    4
    An object has rigidbody and Capsule Collider and Animator. When rigidbody. isKinematic is false, it is often not hit(Physics.Linecast(startPosition, endPosition, out hitInfo)), I've seen the ray passing through Capsule Collider through "Debug.DrawLine", and if it is true, it is easy to hit.



    Why is this?
     
    Last edited: Oct 4, 2019
  2. kbengine

    kbengine

    Joined:
    Jun 20, 2019
    Posts:
    4