Assistance regarding realistic subway/train bogies that survive steep banking without derailing or floating

Greetings folks,

My friend and I are trying to make a proper Subway/Metro general-style bogies that can go up and down hills smoothly, handle sharp, heavily banked/superelevated curves (like up to around 150 mm cant), keeping the visible wheels glued to both rails at all times (no climbing and no derailing) and let the car body stay almost level that is realistic, not tilting with the subway tracks.

Here’s what we encountered, as shown in two screenshots: on banked curves, the wheels lose contact or climb onto the rail, affecting the entire bogie derails:

TrainBogieissuesRoblox2
Sorry for the poor quality on the second screenshot.

Anyways, what we already tried is Direct AlignPosition + AlignOrientation on the bogie itself, which works on flat/hills. However, it derails on banking.

We have normal HingeConstraints / BallSocket, which became too wobbly or still derail.

Not to mention, we look through the creator hub, old train tutorials, devforum threads. Most are pre-2023 and still use the old 4-hinge method that breads on banking.

We know the TrackAnchor with the UniversalConstraint method that supposed to fix this (which every big subway group uses it now), but we can’t figure out the exact, simple setup that actually works completely.

If anyone would drop a minimal open .rbxm (or step-by-step with pictures) of a working front and rear bogie using the aforementioned TrackAnchor and the UniversalConstraint that survives heavy banking, that would be great.

It would save us (and probably half the train community) weeks of pain and frustration.

If you want full 3-axis rotation to support banking, you may be forced to stick with the Ball-In-Socket constraint. If you can make the bogies heavy and the train car light, you could apply a VectorForce constraint to the roof that applies an upwards force to keep the train car upright. The VectorForce would need to be not at centre of gravity and be relative to world coordinates rather than attachment.
I have seen this method used before in the implementation of train suspension.

Well, we did try various forms of Hinge and Ball-In-Socket constraints, but we found them to be too wobbly or still prone to derailing.

Which is why our focus is on implementing the TrackAnchor with the UniversalConstraint method. This setup is known to be the current standard among large Roblox train groups because it specifically fixes the issue of wheels climbing the rails on heavy banking.

The key challenge we’re facing is figuring out the exact, simple setup for the attachments and properties (like Axis, SecondaryAxis, MaxAngle) for that UniversalConstraint. We believe this constraint, when attached to a rail-following TrackAnchor, is the most direct way to keep the bogie aligned with the banked track while forcing the car body to stay upright.

If you happen to know of any examples or a simple step-by-step for the TrackAnchor + UniversalConstraint setup, that would be incredibly helpful!

If not well, show me the examples from other trains using for both Ball-In-Socket and VectorForce.

I am unfamiliar with the TrackAnchor method. What exactly is a TrackAnchor in this context? Is it like a roller-coaster style bogie with gliders that wrap around the rails from below to prevent the bogie from jumping out?

When you talk about banked track, I assume you mean sideways tilt.
If you want the train to be able to traverse track that twists without bogies that twist, you need to ensure the upstop clearance is wide enough given the length of the train for the bogie to fit through.

A universal constraint is a constraint that allows for a rotation on 2 axis. For example, a UniversalConstraint on a bogie allows it to turn left/right for corners, and tilt up/down for hills, but not roll sideways for banking. If the change in gradient on the hill is small enough, you can get away with bogies that don’t tilt using just a HingeConstraint (1 axis), which would increase stability. If you do need tilting, you may want to consider angled gliders that won’t catch on slight imperfections at high speed and/or limiting the max angle so that the bogie’s cannot trip over themselves too much.

If you need the bogies to visually twist with banking, you would have to have a third-axis available, hence a ball-in-socket constraint. This would enable the train to roll sideways freely, hence why some additional constraint is required to keep it upright. An upforce can be used to lift the train like a balloon, while extra-density in the bogies keeps it set on the track. Alternatively, an AlignRotation set to apply on Attachment0 local axis with a MaxForce set such that it can only correct in the roll axis is an option.

Note that it may take some tuning and experimentation to get something stable.