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 an actor towards the character

Hello,

Simple and to the subject,

I want to create an actor , e.g. a box that is like 10 units near me and to move exactly like me, when I move left, to stay at the same distance to me.

I want it as an enemy that will copy my moves.

Thank you.

Product Version: UE 4.18
Tags:
more ▼

asked Apr 03 '18 at 05:24 PM in Blueprint Scripting

avatar image

VladDumitriu
1 1 1

avatar image Vaheva Apr 03 '18 at 07:12 PM

and what about situation, when it can go like this because obstacles for example? You need always this same position or depending on design, with some ai?

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

1 answer: sort voted first

If you just want it to move the same as you but be a set distance away, try attaching the box to the player. That way, then the player root moves, it will move all attached objects in their relative space.

If you want it as a seperate entity, you will need to add the same offsets to the object as you do when you move. Basically, when you move your actor forward 10, you then need a reference to your box and move that forward 10 too.

more ▼

answered Apr 04 '18 at 08:47 AM

avatar image

Dune
1.9k 53 40 200

(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