How to move to an actor, hold it and drop it somewhere else whenever detected by traces on Third person blueprint?
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):
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
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)
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 :D
answered Mar 12 '17 at 01:12 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here