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 make Meshes follow Path like a Train

Hello there,

I have multiple boxes (Instanced Static Mesh Component) in a straight row. When the player moves I want these boxes to follow the player around as if they were connected (like a train or like in the game snake).

alt text

Does anyone have an idea what's the math behind this because I literally have no clue how to start this :/

Thanks for your suggestions! Kind Regards.

Product Version: UE 4.16
Tags:
experiment.png (360.4 kB)
more ▼

asked Jul 28 '17 at 06:52 PM in Using UE4

avatar image

GullJemonStudios
133 31 29 33

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hi,

You can do this using BluePrints. Here is how I would do it. I would get the Manenquin Actor's location and set the Box Actor's location. Lookup 'Set Actor Location', 'Get Actor Location' in Blue Prints.

Something like this. BoxActor Location = manenquin Actor Location - 10

So when the manenquin moves, the box moves as well . You can use interpolation when you move the box from old location to the new location so the movements are smoother.

Also check out Spline points. You can place these boxes on spline points.

Hope this helps d0d0

more ▼

answered Jul 28 '17 at 08:07 PM

avatar image

d0d0
477 16 8 18

avatar image GullJemonStudios Jul 29 '17 at 09:05 AM

Hi there, thanks - I'm quite adept with blueprints so that's not the issue. I cannot use spline points because I want to add more boxes as the player progresses (like in snake). But you're suggestion with the interpolation sounds reasonable, however I'm not sure how I can use this for multiple boxes, as if they were connected by a wire. Thanks anyway, I'm going to try out a little more and maybe I come up with a first solution ;)

(comments are locked)
10|2000 characters needed characters left
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