How do I make my cart in my cart ride game handle curved tracks better

Hello. I am trying to make a custom cart for my cart ride game, with the wheels as hinge constraints that rotate to keep it moving. On straight tracks, both uphill and downhill it works perfectly but when it meets a
curved track it derails. How can I fix this? Thanks in advance

A video to show what is happening:

1 Like

Like I said in your other post (Creating a cart that can go uphill and is more stable) you HAVE to have something like wheels or Parts underneath the rails that keep the cart on the track, and have something in between the rails so that the cart stays centered.
All of those items were in the model I included in that post. You can simplify my model a lot since itā€™s more complex than you need, but if you learn about Collision Filtering | Roblox Creator Documentation you can easily make wheels under the tracks that only collide with the tracks.

1 Like

Because the cart isnā€™t very secure on the track it derails, by adding more parts underneath it should prevent this problem from occurring again.

1 Like

cart ride around nothing by @OneSkyVed canā€™t handle curved tracks, i tried it and it keeps falling on a curved track

Hi, so something like this? Should I set the stiffness of the spring to be very high?
And do I just need a cylinder between the wheels and in the tracks to keep the cart centered, using a weld constraint?
image

These are the configurations I have now
image

Just like in the example place I keep telling you to look at, put a single ā€œcenteringā€ Cylinder (wheel) between the rails where each of the main axles are.
Make them slightly narrower than the rails, and attach each one to the body with a HingeConstraint with the axle vertical.
These wheels keep the main axles centered on the rails.

You only need 1 cylinder below the rails, below the center of the cart body to keep the cart from derailing.
Use Collision Groups to make the bottom cylinder and the ā€œcenteringā€ cylinders only collide with the rails, and nothing else. That way the cart stays on the rails and no matter whatā€™s under or between the rails (like baseplates, Terrain, or rail ties) they wonā€™t collide with them.

Thank you very much for your continuous help. Iā€™ve added your advice and here is what I got

It works a lot better than before, but the curves are still a bit wobbly. Do you have any idea why?

Because itā€™s hitting the wooden tiesā€¦

Use the Collision groups link to show you how to make the bottom wheel collide with the grey rail parts and nothing else in the game.

Iā€™ve made collision groups, and its not the ties that are the problem.

Not sure if this is clear, but both wheels just pass through the ties.
image

Do you have a PrismaticConstraint attached to the bottom wheel, or just the springs?
The prismatic would keep the ā€˜underneathā€™ wheel from sliding around, and it would only need 1 spring.

And are the actual cart wheels Unions or Meshparts? If they are then I guarantee they arenā€™t perfectly round.

What is a prismatic constraint? I donā€™t have that, just springs. The actual cart wheels are just cylinders.

You can research any of these items using the Search tool at create.roblox.com to find details and instructions. Or just use the search tool in these forums.

PrismaticConstraint | Roblox Creator Documentation

So how would I implement the prismatic constraint into the bottom wheel? I am currently unsure on what to attach the prismatic constraint to, and what to set it to.

Wow cool build! I think looking at how the constraints are set up in this resource stravant made would be helpful:

Scottifly is also an expert on constraints and has some great advice.

1 Like