Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    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!