Child Object Left Behind when Parent Moves at Start of Scene

I have a parent object spaceship, and child object engine. The child object has a script so that when I press a button, it applies force to the parent object to move the objects through space. The child object also has a particle system on it for it’s jet flames.

The problem is that at the start of the scene, if I am holding down the accelerate button, when the child object applies force to the parent, for a brief moment, the parent object accelerates a couple of units while the child object doesn’t, making the child object’s flames no longer in the correct position.

If I wait a second or two after starting the scene, this problem does not occur. It seems to be some weird sort of lapse in functionality during the start up of the scene. Not sure if there is a way that I can prevent it from happening…

Good day @Zodd !

I dont know exactly what is happening, i should need to read all scripts, but i can advise this things:

All code inside Awake, Start, OnEnable… and all this kind of funciotns, are executed in a concrete order. Take a look here to learn more. You must be sure they are executing in the correct order. It seems you press Accelerate before they finished of executin, i dont know… you should check that.

The other thing is takingn care of Rigidbody components in objects that are children of parents that also have a rigidbody. You should avoid this situation. If you make a object child of another i recomend to have only 1 rigidbody at the parent, and modyfy it mass when the children is atached.

At this first sight i can only say this. Give more info, post some code (some, not all because we will not read it all…) and maybe we can help you more. Use @tormentoarmagedoom .

Upvote and check the answer if helps!

Bye :smiley: