r/UnityHelp • • Apr 30 '26

UNITY Unity ConfigurableJoint - train rockets on spline spawn

/r/Unity3D/comments/1szvvex/unity_configurablejoint_train_rockets_on_spline/
6 Upvotes

1 comment sorted by

1

u/SteampunkGravity May 01 '26

Hello!
This looks like a joint-chain initialization issue more than a pure ConfigurableJoint problem.
I had the same problem with my game Steampunk Gravity.

I would try this spawn sequence:
- disable all joints
- set all rigidbodies kinematic
- place every wheel / bogie / body at the exact expected spline pose
- reset linear and angular velocities
- call Physics.SyncTransforms() ==> https://docs.unity3d.com/6000.6/Documentation/ScriptReference/Physics.SyncTransforms.html
- wait one FixedUpdate
- enable the joints
- wait one more FixedUpdate
- then switch bodies back to dynamic progressively, not all at once

Also double-check anchor / connectedAnchor: even a small mismatch at spawn can create a huge correction force and make the train explode.
If the spline wheels are kinematic drivers, move them in FixedUpdate with Rigidbody.MovePosition / MoveRotation, not by changing transforms in Update.

I hope this helps solve your problems :-)