How to move to an actor, hold it and drop it somewhere else whenever detected by traces on Third person blueprint?

Hello Everyone,

I have a scene in Third person blueprint where 3 actors are there: Actor A, Actor B, Actor C.

My goals are as follows (see attached image):

  • Actor A has to slide towards actor B when it detects it using radial traces
  • Once Actor A arrives at Actor B, it should hold it and drop it at Actor C location
  • Then it should go back to the old Actor B location and starts looking again for another actor B in the area to hold it to Actor 3 location once again and so on.

Can someone please show me how to code this on unreal engine 4?

Thanks in advance.

hey! i guess this is something like a vaccum robot style thing? or sorter? does he moves randomly on the navigatable ground?

first step: simple movement to random point in navigable radius (until he could detect the things)

2nd step: the detection … i couldnt find this kind of tracing , but i watched the other forum entries and understand the meaning.

so if he finds it, set watching for objects to false so it doesnt look further for objects.

IF its hits more than one trace: create a array which stores every second the traces as actor (breakhit result “hit actor”) and from this you can make a foreach loop and if it “contains” the actor in the array it should move to this actor which was just found

3rd step:

i would recommend to create for every step you take make a bool to have a better controle
now u have to pick up the ball: attach its actor or root component to the front of your actor, DISABLING its collision afterwards is mostly necessary because it bug like hell if not:) (pls tell me if you are using simulate physics , then its quite more difficult). A bool with “Item Picked up” would be good here and branching it so if he picked it up, he directly moves to point C (simple move to location) then detaching it , enabling collision.

then he turns back to point B (branches and bools should do the job, sequence and delay is a good way to make a while loop which doesnt crash because of infinite loop)

step4: repeat.

it begins again from start beside he starts his search at B not A

i hope i could help a little bit, if you dont understand it just comment , but i apreciate it if you make some self effort before asking for a complete bp build up for this because it is a little bit time intense :smiley:

btw ! i have a Youtube channel for some tutorials of game mechanics maybe this one could help a little bit!

Zelda Breath of the Wild: Skeleton Unreal Engine 4 Mechanics - YouTube it quite describes a find object and get it function:)

+Erytriel thank you so much for the effort… I truly appreciate your help. I will try this soon and tell you back for sure and thanks for the video as well, I will subscribe to your channel too and wish if you can do a tutorial about this for me sometime this week if possible.

Actually I spent good time trying things out… in the links before I had previous trials but they don’t work still the way I wanted and for some reason, I can’t find what I am looking for online because of the unknown keywords to use.

+Erytriel Thank you so much. I really like your video, It’s amazing…
I hope it works with me as well. I left a comment there.