- Home /
How to snap objects to path?
I want to create a path to snap objects to it so they will freely move forward and backward on it, but at the same time they must be free to go up and down.
The idea is to make an 2D-like 'space', like in platformer games, but being able to twist that 'space' around 3D-level.
I've searched different solutions and tutorials, but they all was more like actually move objects though paths/waypoints, while I want just to snap object position and direction in some dimensions (X, Z), leave free the other (Y) and let the objects move on their own.
You can do this by using a parent/child relationship. $$anonymous$$ake a empty game object follow/snap to the path with your visible object as a child. Allow your child object to adjust its local 'y' only with respect to the parent.
Your answer
Follow this Question
Related Questions
Waypoint System 1 Answer
Move along a run-time generated path of varying length at a set speed. 1 Answer
How to make multiple, evenly-spaced objects follow any path with any number of points? 2 Answers
Recommendations for basic AI/path scripting for shoot 'em up enemies 1 Answer
My "Smooth Rotation" Jerks around randomly when switching between points. 0 Answers