Make ACTOR move to anoter specific actor

I wish to make the AI MoveTo node for actors. The specific target in this case that this actor is following is called Apple and as soon as the radius finds it, it hunts for the apple.
This is a simple simulation program.

The actor is called Hunter and is spawned thrice randomly in the map. I tried making the Hunter to a pawn but that would disable the spawn since its not an actor anymore (I think?). So I had to change back to an actor which allowed the spawning but now I need to find another way to make the actor move to the apple that it finds.

Hi @ExpectedYou! Welcome to the forums!

Would you mind sharing the blueprints you are using to spawn your actors? A pawn should still be able to spawn, there may be something wrong with the specifics of how you are bringing your actors in to your scene.

Any additional information you can provide will be a big help in solving your problem!

1 Like


Here you go :smiley:

(This is in the level blueprint)

Hey @ExpectedYou.

Okay, seems you already have a print string test firing off, so I have a few more questions.

  • Does your string print when running?
  • Did your actor start as a pawn blueprint? Or did you make/try making a separate blueprint for it?
  • When you changed your actor before, did you reset/readd that pawn to your class dropdown in SpawnActor?
  • Were there any level errors when you ran the level when the actor was set to be a pawn?
1 Like

Try to set the Colission Handling to “try to adjust always spawn”.
Currently you try to spawn each pawn inside of another one… Which skips the spawning.

As Info:
Every Object in your Game… And i mean really… Every object… Is an AActor at its Base… Keep that in mind… You will need it more often than you expect :wink:

1 Like
  1. Yes it does print out wether its 350 or -350
  2. It started as an actor not a pawn. I just simply changed it from actor to pawn and back to check if it worked or not.
  3. I did not do that but i will try now, — Ok it didnt work when I did that.
  4. It did not create any errors for when it was both actor and pawn class, everything worked but it simply just didnt spawn in the hunter as pawn like when it was as an actor class

Im kinda new to UE5, would you be kind to tell me the path I need to take in order to find that collision handling :sweat_smile:

Its the Combobox directly inside the SpawnActorFromClass Node, that is set to “Default” in your shot.
Called “Colission Handling Override”

You have multiple ways to handle spawn Colission. For Example:

  • You can skip the spawn if actors overlap (default).
  • You can let the System try to find the nearest available position and spawn the Actor there (try to adjust and always spawn).
  • You can Always Spawn, ignorie colission… Which means Actors can spawn Inside each other (ignore Colission and always spawn)

Keep in Mind… Unreals Distance System works in Units… A Unit can be a cm, can be an inch…or any other Measuring Format… In most cases, a unit is a cm.

So… a Distance of 100 == 1m == 100cm
If your Actor has a size of 180 height, 50 thick and 120 wide… Your 350 units distance is to narrow… More narrow when your expect your random value range to be -350…+350, which means it can be 0.001, too :wink:.

1 Like

This “try to adjust always spawn” solved my problem, Thank you :smiley:

1 Like