I have an ai controller and behavior tree that is mean to have the ai chase a player around. Its working on a pawn but bc i could not get the pawn to focus nor rotate. I was going to update that ai to be a character. When i changed it to a character the ai stopped working. However, it is still working on my pawn ai. as far as i can tell i retraced all my steps correctly. bc my prototyping map is made out of two differnt platforms, with differnt collision channels, ive been testing it on the two differnt platforms. on a simple actor it will chase once and then stop, whereas the pawn will continue. whereas on a custom platform with this collision channel it wont follow at all. I beleive that the nav mesh is being created as the platform is shaded as dictated by the nav invoker. Does anyone have any idea why the character ai wont follow where as the pawn is?
Does your Character have an AI Controller?
Is it set to spawn the AI Controller both âwhen spawnedâ and âwhen placed in level?â
Is the movement mode set to AI Walking?
The AI does have a controller, and it is set to walking. It is the same controller as the pawn. It is set to both when spawned or when placed in the level.
Ensure your Character blueprint in question has the âCharacter Movement (CharMoveComp)â and if your using any of the senses like sight or hearing youâll also want âPawnSensingâ
Regular/Both:
Then ensure your Character blueprint is also using the correct Ai Controller Class
Blackboard:
if your using a blackboard youâll wanna go into the controller class youâve made and add a node to begin play called âRun Behavior Treeâ
Both:
also ensure inside AiControllerClass you have âAuto-Activateâ checked â Likely what i believe your problem be
and your done if you had a blackboard it should now use it
if you didnât and skipped that part then you should just be able to use your regular event graph and do your normal pawn sensing things or AiMoveTo just fine
Hi
Thank you for the reply. I am not using any senses yet, but am hoping to in the future. Thank you for the tip. I have auto-activate checked, and I am using the correct AI controller class. I am really confused because the behavior tree, blackboard, and aic are working correctly on my pawn but not my character. Is there possibly a major difference between the floating pawn movement component and the base character movement component that is making them act differently. The character will do the action as desired by the behavior tree once on a basic actor platform but not on the one with a custom channel. Whereas the pawn will do it regardless. Hopefully any of this information will help narrow it down.
In class settings is the âparent classâ set to âCharacterâ? on your character bp
The only other idea i have for you is maybe make another controller it could be that its not getting instanced correctly for some reason so only 1 class can use it
The parent class is set to character in the character blueprint. To be clear, tho, this charcter blueprint is not meant to be playable it is just meant to be an enemy ai.
Can you show the event graph where your calling the âAi MoveToâ
does the execution fire on the âAi MoveToâ node?
and im assuming the pawn/characters in question are definitely in a nav mesh
yeah they are both in the nave mesh. It is not using an ai move to node as Im using a behavior tree to do it, so looks like this:
do the ârun Blackboardâ off of begin play and wire everything else back as if it wasent there for giggles instead of âpossesesâ
Honestly unless you got something going on where you need âpossessesâ this should return the same result if you just did all of it on BeginPlay
The pawn still works properly, but the charcter isnt. It should be mentioned that the charcter focuses on the player as dictated by the behavior tree but wont move
i will mvoe everything over then.
if the static mesh does not break out of the capsule component is it incapable of walking?
You could probably also set your blackboard variables in the actual characterbp as it may be getting the wrong player controller or something but this is just a wild guess
Not sure what your asking exactly but maybe this helps?
Sorry i meant like if the skeletal mesh is fully contained within the capsule component in the viewport, if it would still walk.
I just found the issue. It was a problem with the blueprint in one of the sequences. I had forgotten that one of the tasks required me to cast to the bp and so i had been casting to the old pawn bp this whole time. It is now working as desired. Thank you so much for all the help.
Wanna mark this as the answer so people can see that you found the problem ^ and i can get my first answer
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.