Search Unity

Raycasts not hitting WheelColliders

Discussion in 'Physics' started by ArachnidAnimal, Sep 9, 2019.

  1. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,825
    I'm generating raycasts using Physics.Raycast (...). It appears the raycasts are not hitting/detecting Unity's wheel colliders, and is returning false. The rays pass right through the wheelcolliders. Does raycast not work on WheelColliders?
    Unity 2017.4.18
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    No, they don't. WheelColliders aren't "solid" entities as other colldiers. Indeed, WheelColliders are also raycasts.
     
    ArachnidAnimal likes this.