x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.12
Tags:
more ▼

asked Mar 08 '17 at 12:44 PM in Using UE4

avatar image

Hoda El-sayed
2 3 5 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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)

alt text

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

alt text

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 :D

help1.png (155.0 kB)
help2.png (172.1 kB)
more ▼

answered Mar 12 '17 at 01:12 PM

avatar image

Erytriel
324 14 3 10

avatar image Erytriel Mar 12 '17 at 01:14 PM

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

https://www.youtube.com/watch?v=hXx991SfYHM it quite describes a find object and get it function:)

avatar image Hoda El-sayed Mar 13 '17 at 02:02 PM

+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.

avatar image Erytriel Mar 16 '17 at 03:46 PM
avatar image Hoda El-sayed Mar 18 '17 at 03:57 PM

+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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question