- Home /
Im trying to a child object follow the path of the parent in the path that the parent has already traveled...
Im trying to a child/children object(s) follow the path of the parent in the path that the parent has already traveled, if the parent stops moving i would like the child/children to stop as well. Once the parent starts moving I would like the child/children to continue the path of the parent like trying to make a centipede type object for example. Can anyone point me in the right direction to get me started on how to do that? Any help would be appreciated. Thanks again.
A possible option is to use the Queue collection. Continuous Enqueue and Dequeue.
Do you have any links that could $$anonymous$$ch me about this, as this is the first time I have ever heard about Continuous Enqueue and Dequeue?
How would I apply it as an example if I at least had the parent sphere object and 2 children sphere objects so it would be Parent Sphere < Child Sphere < Child Sphere and how would I apply the script or scripts I would put in each sphere?
Thanks again.
Answer by tormentoarmagedoom · Feb 21, 2019 at 05:58 PM
Good day.
If you pretend one object to follow another, thay can not be parent and child (or not recommended) You need to move the 2nd the same way you move the first.
Bye.
So I guess I would get the current position of the original object x and y. Then I would I make it so that it follows the path only when the original object moves... but how would I do that so that the 2nd object, 3rd object etc. following the original object only travels and stops when the original travels and stops respectively? Any tips or pointers? Thanks for the input.
Your answer
Follow this Question
Related Questions
Make child's transform independent of parent 1 Answer
Parenting an object changes its transform. 0 Answers
Avoid scaling GameObject after parenting 2 Answers
Strange movement artifacts when rotating children around parent object 1 Answer
Child animator component is moving parent despite unchecking "Apply Root Motion" 1 Answer