Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice
  2. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

[Feature Request] bool parameter to Raycast method : don't include plane hits when dot product > 0

Discussion in 'AR' started by BuoDev, Jul 29, 2019.

  1. BuoDev


    Nov 28, 2018
    Currently hit results include all plane hits regardless of their direction. I think in most cases people only want to hit planes that are facing the camera e.g. dot product is < 0. The problem is evident when planes are close to each other or overlapping, or there is otherwise a lot of planes at different depths.

    Please add a boolean parameter to the Raycast method to filter hit results when the plane's direction & ray's direction dot product is more than/ less than 0.

    false (don't include) = dot >= 0
    true (include) = dot < 0

    I think this is a reasonable request and simple to implement.

    Thanks a lot!