Search Unity

Nav Mesh Agent Base Offset on X and Z axis

Discussion in 'Navigation' started by HAIRGROW, Jul 22, 2019.

  1. HAIRGROW

    HAIRGROW

    Joined:
    May 17, 2013
    Posts:
    19
    So I'm developing a VR Game where the Player / Camera Rig will utilize a NavMesh Agent. My locomotion system works by calling NavMeshAgent.Move with an appropriate propulsion Vector. The problem I'm running into, is the built in Collider for the NavMeshAgent, is centered to the Transform it sits on and can only be adjusted in the Y axis. I.E. The Base Offset.

    Is it possible to manipulate the X and Z axis of the builtin Collider for the NavMeshAgent.

    What's happening is that as I move about the 3D world and collide with the edge of the NavMesh or any other NavMeshAgents, the contact point happens at the center of the Place Space. The contact point should happen with where the Player is located.

    I'm using SteamVR and I have also considered making the CameraRig a child of an empty game object. And then take the local position difference between the headset and the play space and apply that as an offset to the local position of the play space and it's new parent, in the negative direction .

    Not sure if it's even possible to do what I'm asking, but conceptually it should work.