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 can I make a series of actors follow one another precisely?

Yesterday I posted this question trying to learn how to make my SnakeBody class follow my SnakeHead class in my Snake clone. Today I'd like to see if anyone has any suggestions on how to implement an alternate method. I saw this video of "Pix the Cat" and I'd like to see if I can get the SnakeBody instances to follow my SnakeHead player, much the way the ducks follow Pix the Cat. I'd like to dynamically add SnakeBody elements to the SnakeHead, or even subtract them if I decide to add powerups/powerdowns to the game.

Is there any easy, elegant solution I'm missing on how I can get actors to follow the player precisely, following the exact path the player has taken?

Product Version: Not Selected
Tags:
more ▼

asked Oct 12 '14 at 12:37 AM in Blueprint Scripting

avatar image

Spinkler
45 7 10 14

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

1 answer: sort voted first

Well, there are two quick solutions I see: One, use physics constraints (https://docs.unrealengine.com/latest/INT/Engine/Physics/Constraints/ConstraintsReference/index.html), which will allow you to chain all of your actors together and move as a group.

Since you are specifically referencing 2D gameplay however, I think you might get more out of solution Two: Maintain a history of points that you (the head) have traveled, and have each child actor follow them in turn. This is especially easy if you use grid constraints like the video you have there (basically, you just need to store off your grid node history).

more ▼

answered Oct 12 '14 at 12:56 AM

avatar image

RPotter
260 5 3 13

(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