- Home /
Moving behavior of following gameobjects
Hi, I’m trying to clone this arrow game from ketchapp which I don’t intend to publish, I’m only doing it for learning purposes so don’t hate me for that. Anyway I’m using Unity and I’ve programmed the controller which is attached to the head, and the tail parts have the script which tries to follow the head. But the tail parts are not following in a desired behavior like they do in the actual game. I’ve tried spherical interpolation (slerp) and smooth damp (vector2.smoothdamp) for the follow like positioning of tail parts, but it’s making a curvy pattern (which it should because it’s slerp and smooth damp) when the head moves left or right which is not what I want. In the actual game the tail parts move exactly in a way or in a pattern the head moves. I’ve thought of storing the transform of head, and then making the rest of the tail parts follow through them but that doesn’t seem like an efficient approach at all. So how should it be approached? I’m attaching images from the actual game and my work so far.
You mention storing the position and running the tail through it... even if it's not the most efficient, give it a shot. Not only could that work with the right algorithm, but if you're doing this to learn, you'd learn a lot from trying that.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How do I make prefab follow a gameobject?(C#) 1 Answer
Keeping camera stay put in the y position 2 Answers
Camera shake while following Player 1 Answer