Search Unity

Height of mesh (like a bridge)

Discussion in 'Navigation' started by Alieno79, Dec 21, 2020.

  1. Alieno79

    Alieno79

    Joined:
    Oct 11, 2015
    Posts:
    19
    Hi, I wanted to understand how to calculate the existing height under a gameobject which could be a bridge, just to understand if the player can pass under or not. I don't want to use the navmesh, just know the space between the ground and the underside of the bridge.
    With raycasts I can know at what height the bridge is, but this does not imply how much space (based on its thickness) it occupies under itself.
    I hope I have expressed myself well and that google has translated clearly.
    Thank you all for any advice you can give me

    bridge > /////////////////////////
    bridge > /////////////////////////////
    bridge > /////////////////////////////////
    bridge > ///// traversable height
    terrain > _______________________________