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

[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

    BuoDev

    Joined:
    Nov 28, 2018
    Posts:
    45
    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!