Announcement

Collapse
No announcement yet.

Bug Report: AI controller / MoveToLocation not working when pawn is spawned

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [BLUEPRINT] Bug Report: AI controller / MoveToLocation not working when pawn is spawned

    I want to report a bug in 4.25, when spawning an AI pawn via a blueprint the "Move to Location" function (or any other "move to" node) does not work.

    However, when I place the pawn manually into the level, it works fine and the pawn moves to the set location. It only does not work when spawning it via blueprint (either via "spawn actor from class" or via "spawn AI from class" ).

    I have set "Auto Posses AI" to "Placed in World or Spawned".

    Click image for larger version  Name:	flyingAI-problem.png Views:	0 Size:	76.6 KB ID:	1803846Click image for larger version  Name:	flyingAI-problem2.png Views:	0 Size:	94.7 KB ID:	1803848Click image for larger version  Name:	flyingAI-problem3.png Views:	0 Size:	27.3 KB ID:	1803847


    As you can see from the screenshots, there is really no reason why this should not work. Especially since it works fine if the pawn is placed manually into the level.

    I reproduced it in a new, clean & empty project and it's still the same (not working when spawned), so there must be some bug with the AI controller when a pawn is spawned & not manually placed.


    Could someone please look into this?

    Thanks!

    #2
    Everything is working fine. Are you using an ai controller or all the control is done in the pawn itself? Have you tried, inserting a delay between begin play and isvalid?

    Also, are the return values of the moves nodes successful? Since you're calling Move right from the begining and only once, then make sure to spawn the AI very close (touching the limit) or inside the nav mesh volume.
    Last edited by EvilCleric; 08-22-2020, 01:19 PM.
    "I have harnessed the shadows that stride from world to world to sow death and madness."

    Comment


      #3
      Originally posted by EvilCleric View Post
      Everything is working fine. Are you using an ai controller or all the control is done in the pawn itself? Have you tried, inserting a delay between begin play and isvalid?

      Also, are the return values of the moves nodes successful? Since you're calling Move right from the begining and only once, then make sure to spawn the AI very close (touching the limit) or inside the nav mesh volume.
      Did you see the screenshots I made?

      A delay between "begin play" and "is valid" doesn't fix it, I already tried that.

      There is no navmesh and it isn't needed anyway. It's a simple MoveToLocation using FloatingPawn movement. As I have said, it works perfectly fine when the pawn is being placed into the level manually, but not when being spawned via blueprint.

      The return value gives me a "successful" when the pawn is placed manually into the level, but a "failed" when being spawned. Therein lies the whole problem.
      Last edited by spacegojira; 08-23-2020, 07:40 AM.

      Comment


        #4
        Sorry, still unable to replicate your problem.

        UE4 4.23.3
        Pawn: static mesh + floating component
        No navmesh
        All moveto logic in the pawn itself
        "Placed in World or Spawned", "AIController"
        No delays

        In editor or spawned (spawn actor or spawn ai), all working ok.

        Am I missing something?
        "I have harnessed the shadows that stride from world to world to sow death and madness."

        Comment


          #5
          Originally posted by EvilCleric View Post
          Sorry, still unable to replicate your problem.

          UE4 4.23.3
          Pawn: static mesh + floating component
          No navmesh
          All moveto logic in the pawn itself
          "Placed in World or Spawned", "AIController"
          No delays

          In editor or spawned (spawn actor or spawn ai), all working ok.

          Am I missing something?
          Thank you for trying to replicate it, but perhaps it's that you are not using 4.25? I had a discussion in the Unreal Engine Discord yesterday and another user had the same problem, with the "move to" not working when spawned, so it's not me alone.
          Last edited by spacegojira; 08-23-2020, 11:38 AM.

          Comment


            #6
            Originally posted by spacegojira View Post

            Thank you for trying to replicate it, but perhaps it's that you are not using 4.25? I had a discussion in the Unreal Engine Discord yesterday and another user had the same problem, with the "move to" not working when spawned, so it's not me alone.
            Sorry my bad. It's 4.25.3.
            Last edited by EvilCleric; 08-23-2020, 12:08 PM.
            "I have harnessed the shadows that stride from world to world to sow death and madness."

            Comment


              #7
              Originally posted by EvilCleric View Post

              Sorry my bad. It's 4.25.3.
              Did you create a seperate blueprint that spawns the flying pawn? Considering that another user on Discord had the same problem, and it doesn't work in a new, clean project either, means something is broken.

              Comment


                #8
                Originally posted by spacegojira View Post

                Did you create a seperate blueprint that spawns the flying pawn? Considering that another user on Discord had the same problem, and it doesn't work in a new, clean project either, means something is broken.

                Yes. Spawned both in the level BP and on a separated BP, all works ok.

                Every problem I ever had with the move nodes, were caused by: trying to move before possession, no controller, no navmesh (no problem in this case) and invalid target or destination (also no problem in this case).

                The only way I can make it fail is by using any other Move node (without a navmesh and with UsePathfinding set to false). But "Move to Location" always works.

                Weird.
                "I have harnessed the shadows that stride from world to world to sow death and madness."

                Comment


                  #9
                  have you tried the node "Spawn Default Controller" on your spawn actor from class?

                  Comment


                    #10
                    Originally posted by brahoule View Post
                    have you tried the node "Spawn Default Controller" on your spawn actor from class?
                    Just did, it doesn't help.

                    Comment

                    Working...
                    X