/// <summary> /// Land on a surface /// </summary> /// <param name="onNavMesh">Surface must be NavMesh</param> /// <param name="freefall ">Just fall down instead of gently landing</param> /// <returns> /// Wether or not the function was successful /// </returns> public bool Land(bool onNavMesh = true, bool freefall = false) { if (CurrentFlyableState != FStatesFlyable.Flying || (onNavMesh && !NavMeshAgentComponent.IsAboveNavMeshSurface())) { return(false); } _freefall = freefall; FSMFlyable.ChangeState(FStatesFlyable.Landing); return(true); }
public bool IsAboveNavMeshSurface(out Vector3 navPosition) { return(NavMeshAgentComponent.IsAboveNavMeshSurface(out navPosition)); }
public bool IsAboveNavMeshSurface() { return(NavMeshAgentComponent.IsAboveNavMeshSurface()); }