- Home /
Camera follow 2d Object Path
I have a 2d path inserted as a sprite in unity and i have a 2d object that moves in a spiral behavior inside this path.
What would be the best practice to make the camera follow the object moving without it's spiral behavior ?
As a best practice , should i make the camera follow the 2d object or the path ?
I thought of using points as empty game objects along the path and writing a script attached to the camera that takes the transform of these points and moves along them.
But I'm not sure whether this was the best practice to achieve such thing ,or is there a better solution.
Answer by jinoh · Dec 24, 2019 at 05:18 PM
this is not correct answer but How about using smoothDamp? smoothDamp can do similar thing here's a link https://docs.unity3d.com/ScriptReference/Vector3.SmoothDamp.html
Your answer

Follow this Question
Related Questions
how to create 'pathfollow-no collision' code 2d? 1 Answer
How to add more walking path elements 0 Answers
How to prevent non-collider-objects from touching each other? 1 Answer
Problem with the climbing of stairs ( character piloted by coordinates) 0 Answers
iTween path constrained character: force original orientation? 0 Answers