Results 1 to 5 of 5
  1. #1
    Prisoner 849
    Join Date
    Apr 2010
    Posts
    891

    Default GeneratePathToActor/Location inside GameAIController

    Does anyone use those functions and what exactly they doing, if they do anything at all? For me they always just return false?
    It seems they relate to navmesh pathing, but i cant actually get those working and have to implement my own like DD did.

    Any idea why they are there? Just prototypes?


    bye Andy
    Last edited by AndyPandy; 07-14-2010 at 07:13 AM.

  2. #2
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Posts
    73

    Default

    From what i've experienced with it, it sets up the navigation handle to work with the navmesh to pathfind to the given actor. It uses the default path constraint: NavMeshPath_Toward, which returns the shortest path to the actor. It also uses the default evaluator: NavMeshGoal_At, which returns when a polygon with the goal actor is found.

    (see http://udn.epicgames.com/Three/NavMe...eshPath_Toward for details of other constraints and evaluators)

    The function FindPath is then called which calls the a* algorithm to find the path and stores it in the NavigationHandle variable PathCache. The FindPath function returns whether this process was a success or not.

    If it is a success then NavigationHandle.GetNextMoveLocation(NextDest, Arrival distance) is called. This stores the next location the pawn should actually move towards and it stores it in the given variable for NextDest.:

    /**
    * will return the actual point that we should move to right now to walk along our path
    * this will usually be a point along our current edge, but sometimes will
    * be something else in special situations (e.g. right on top of the edge)
    * @param out_MoveDest - output movement destination we have determined
    * @param ArrivalDistance - this tells getnextmovelocation how close to a point we have to be before MoveTo() returns
    * necessary so we can compesnate for early arrivals in some situations
    */native function bool GetNextMoveLocation( out Vector out_MoveDest, float ArrivalDistance );
    The GeneratePathToActor function then returns this NextDest variable and usually the latent function MoveTo is called to get the pawn to move towards the given destination actor.

  3. #3
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Posts
    73

    Default

    See GameCrowdAgent's function for GeneratePathToActor for a better idea

  4. #4
    Prisoner 849
    Join Date
    Apr 2010
    Posts
    891

    Default

    Oki u misunderstood my question, i know how the Crowd and DD "versions" of "GeneratePathToActor" work, but the 2 functions inside "GameAIController" are not the one that are used, since they both DD and CrowdAgent don't extent from GameAIController.
    Also the signature is different:

    Code:
    class GameAIController
    
    event bool GeneratePathToActor( Actor Goal, optional float WithinDistance, optional bool bAllowPartialPath );
    event bool GeneratePathToLocation( Vector Goal, optional float WithinDistance, optional bool bAllowPartialPath );
    vs

    Code:
    event vector GeneratePathToActor( Actor Goal, optional float WithinDistance, optional bool bAllowPartialPath )
    So i wonder why is the signature different and why did DD/CrowdAgent implemented those them-self?

    I mean its no big problem im just curious

  5. #5
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Posts
    73

    Default

    Lol sorry.

    I guess it could be something to do with Controller inheriting the "Interface_NavigationHandle" but to be honest i'm not too sure. It's never called from anywhere and i don't think anything actually uses GameAIController.

    To me it just seems like an abstract function which can defined later in subclasses


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.