- Home /
ConfigurableJoint to constrain objects to a straight track
I am attempting to create a physics simulated train set.
Tracks are straight
Trains must be physics enabled
I have created a ConfigurableJoint for each train object, attaching it to an invisible cube representing the center point of the track.
I expected that by using this objects position as the anchor, simply applying a linear limit and locking all but XMotion would achieve success.
I have also attached the Center of Track cube as the ConnectedBody object to each of the trains.
However each train is being constrained to the linear limit offset from its original position, not from the center of the track. So for example if the train starts at the centre of the track its boundaries are fine, however if it starts at an offset from the center it can travel outside of the intended boundary.
The intent is that any trains on the track will have the same bounds no matter their starting position.
Is it possible with just the configurable joint settings? What am I missing here?
Your answer
Follow this Question
Related Questions
Tracked Ride Physics Simulation 0 Answers
consecutive angularxdrive.positionspring.equals() not working 0 Answers
Configurable Joint not working correctly in a moving vehicle 0 Answers
JointDriveMode is Obsoleted on Unity 5.3, so what now? 2 Answers
Violent shaking when using position drive in Configurable Joints 1 Answer