Results 1 to 10 of 10
  1. #1
    MSgt. Shooter Person
    Join Date
    Apr 2010
    Posts
    169

    Default Navmesh problems

    I'm having problems with navmesh when I launch a game normally, while in play in editor everything works well.
    Some more details of the errors I'm getting and the code I'm using can be found in this thread (the user matfer is my mate in the project).
    After some moves of my pawn, as I said in the thread above, I get PATHERROR_GOALPOLYNOTFOUND, and with VerbosePathDebug the console says:
    Code:
    Log: VERBOSE PATH MESSAGE: SEARCH FAILED! InitializeSearch return FALSE!
    Another issue: I tried to make a dynamic navmesh obstacle with the tutorial Creating a dynamic Navigation Mesh Obstacle. It works well in play in editor, but a normal game crashes after some updates of the obstacle shape, and the console says this:
    Code:
    Critical: appError called: Assertion failed: i>=0 && (i<ArrayNum||(i==0 && ArrayNum==0)) [File:d:\depot\unrealengine3\development\src\core\inc\Array.h] [Line: 575]
    Stack: Address = 0xd398d9 (filename not found) [in C:\UDK\UDK-2011-09\Binaries\Win32\UDK.exe]
    I even tried to make a full recook as suggested in a thread, but it didn't help. I'm using UDK september 2011.

  2. #2

    Default

    Some more tests: the two errors also happen launching the game in 64 bit mode. Tested on Windows 7 x64 (Italian).
    Tried with Dungeon Defense navigation code, too. Can't figure out why we aren't able to use something that worked in 2009.
    MB: Asus p8p67-M, CPU: Intel i5-2500K (3.3 GHz), RAM: Corsair Vengeance 2x4 GB, VIDEO CARD: Asus GeForce 560 TOP, OS: Windows 7 x64 (Italian)

  3. #3
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Posts
    274

    Default

    It would be very helpful to see the actual dynamic nav mesh code you have used. As for the code that matfer posted in the other thread, There is nothing there to deal with moving objects on the navmesh. and you will get the error about the navmesh line when the pawn is trying to navigate to the line while some other object has encroached on it.

    -Mega

  4. #4

    Default

    This is the code for the obstacle:
    Code:
    class IVVNavMeshObstacle extends NavMeshObstacle
        notplaceable;
    
    var IVVKActor IVVKOwner;
    var Vector PrevLoc;
    var Rotator PrevRot;
    var Array<Vector> Shape;
    
    simulated function PostBeginPlay() {
        Super( Actor ).PostBeginPlay();
    
        IVVKOwner = IVVKActor( Owner );
        if ( IVVKOwner != None ) {
            PrevLoc = IVVKOwner.Location;
            PrevRot = IVVKOwner.Rotation;
            UpdateShape();
        }
    }
    
    function Tick( float DeltaTime ) {
        Super.Tick( DeltaTime );
    
        if ( IVVKOwner.Location != PrevLoc || IVVKOwner.Rotation != PrevRot ) {
            UnRegisterObstacle();
            UpdateShape();
            RegisterObstacle();
    
            PrevLoc = IVVKOwner.Location;
            PrevRot = IVVKOwner.Rotation;
        }
    }
    
    function UpdateShape() {
        local Box Bounds;
        local Vector Point;
    
        IVVKOwner.GetComponentsBoundingBox( Bounds );
        Shape.Remove( 0, Shape.Length );
    
        Point.Z = ( Bounds.Max.Z + Bounds.Min.Z ) / 2.0;
    
        Point.X = Bounds.Max.X;
        Point.Y = Bounds.Max.Y;
        Shape.AddItem( Point );
    
        Point.X = Bounds.Min.X;
        Point.Y = Bounds.Max.Y;
        Shape.AddItem( Point );
    
        Point.X = Bounds.Min.X;
        Point.Y = Bounds.Min.Y;
        Shape.AddItem( Point );
    
        Point.X = Bounds.Max.X;
        Point.Y = Bounds.Min.Y;
        Shape.AddItem( Point );
    }
    
    event bool GetObstacleBoudingShape( out Array<Vector> OutShape ) {
        local Vector V;
    
        if ( IVVKOwner != None ) {
            ForEach Shape( V ) {
                OutShape.AddItem( V );
            }
            return true;
        } else {
            return false;
        }
    }
    IVVNavMeshObstacle is spawned with a IVVKActor as owner and updates the shape as the kactor moves. Actually while the kactor moves the update is made every tick, just to try the performance of the worst case, I'll slow it down for the final version.

    As for the code that matfer posted in the other thread, There is nothing there to deal with moving objects on the navmesh.
    You are right, it doesn't consider moving objects for now, but I get the navigation problem even if there are no moving objects nor navmesh obstacles in the map.

    As for the obstacle shape update crash it happens even if there are no controllers using navigation in the map. The crash happens after few thousands of updates, which means some seconds if the update is made every tick, but even slowing it down it will take less than a hour if there are many moving objects.

    I already asked this in another thread, but still no answer, so I ask again: can someone confirm that he is using navmesh navigation successfully in a NON play in editor game (with a recent udk version)?
    MB: Asus p8p67-M, CPU: Intel i5-2500K (3.3 GHz), RAM: Corsair Vengeance 2x4 GB, VIDEO CARD: Asus GeForce 560 TOP, OS: Windows 7 x64 (Italian)

  5. #5
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Posts
    274

    Default

    Ok looking at your code there:

    Point.Z = ( Bounds.Max.Z + Bounds.Min.Z ) / 2.0;

    Not sure why you would do this. Setting Z as the mid height of the bounding box. Looking at the http://udn.epicgames.com/Three/DevelopmentKitGemsCreatingADynamicNavMeshObstacle. html code, Z is always left undefined (or 0)
    It is quite possible that the Z value is discarded in the RegisterObstacle() method... In either case it is best not to change it from 0.

    Another possibly issue i see is that in that guide.. they Spawn a new navmesh obstacle after unregistering it. I know that what you are doing makes sense... but the way UDK is, this could be a problem. Would be worth testing it quickly handling the updating and spawning of navmesh obstacles externally.
    My suggestion would be to put in the tick function of your IVVKActor to handle the navmeshobstacle and unregister / respawn / register it on each tick you have to.

    -Mega

  6. #6

    Default

    Thanks for the reply.

    From what I tested setting the Z coord of the shape points is actually needed, and it is better to set it to the lower point of the bounds (Bounds.Min.Z) rather than then the mid height. I know this by using "show paths" to see how the navmesh gets updated. Since my map floor is at a height rather higher than zero, leaving the shape Z at zero results in no update of the navmesh.

    I tried to move the update code to the kactor but it doesn't change anything.
    MB: Asus p8p67-M, CPU: Intel i5-2500K (3.3 GHz), RAM: Corsair Vengeance 2x4 GB, VIDEO CARD: Asus GeForce 560 TOP, OS: Windows 7 x64 (Italian)

  7. #7
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Posts
    274

    Default

    You are still getiing crashes?

  8. #8

    Default

    Yes , same as before.

    Forgive me for keeping asking, meganaut, have you ever used successfully navmesh navigation in a NON play in editor game?
    MB: Asus p8p67-M, CPU: Intel i5-2500K (3.3 GHz), RAM: Corsair Vengeance 2x4 GB, VIDEO CARD: Asus GeForce 560 TOP, OS: Windows 7 x64 (Italian)

  9. #9
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Posts
    274

    Default

    i have never needed to use it

  10. #10

    Default

    I think I found what was causing the errors. If I use one of the built-in Scout classes (Scout, UDKScout or UTScout) instead of my custom scout, I don't get neither the navigation problem nor the obstacle one (it was so simple! ).
    Moreover while using one of the built-in scouts if I use "show paths" (to see how the navmesh gets updated by obstacles) in play in editor it crashes after some seconds, while in a normal game works well.
    I did the tests with september udk, with october version I only made a few tries but it seems the same.
    MB: Asus p8p67-M, CPU: Intel i5-2500K (3.3 GHz), RAM: Corsair Vengeance 2x4 GB, VIDEO CARD: Asus GeForce 560 TOP, OS: Windows 7 x64 (Italian)


 

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.