Ok, so I only need one hinge constraint between 2 wheels? And I connect them so that they are welded together and the hinge constraint works as an axis?
Don’t start another thread.
It’s basically the same issue, so keep the thread in one place instead of linking other threads to this one. Please delete the other post so there isn’t any confusion.
To keep a HingeConstraint from turning (brakes) just set the AngularVelocity to zero, and the MotorMaxForce to something like 100,000 for starters.
And yes, like I already said, you just made an axle with the welds between the wheels.
I made both of the attachments exactly the same
And put the hinge constraint in the other wheel
Now how do I weld the wheels to the cart?
Since the wheels just fall off the cart
How do I weld the wheels to the car so that the wheels can still rotate?
Don’t weld the wheels to the cart.
One attachment is in the cart (Attachment0). It shouldn’t be in the other wheel.
One attachment is in the wheel (Attachment1). You have this as the FrontRight
This lets the wheel spin or drive the cart.
Weld the left wheel to the right wheel so they both spin together.
If you have a common axle it doesn’t matter where the location of the Attachments are along the length of the axle, both wheels will spin and be firmly attached to the cart through the HingeConstraint.
If they still fall apart make sure that in the Properties window the Attachment0 and Attachment1 boxes are actually attached to the correct point. I’ve copied or deleted items and those boxes still reference where the HingeConstraint used to be attached, but those items aren’t actually there anymore and cause confusion.
If you select the HingeConstraint it will highlight both the Parts that are attached through the Constraint with a green box. This lets you know they are connected through the Constraint.
Alright. What weld should I use to weld the two wheels together? Just the normal weld?
A ConstraintWeld is the easiest.
Alright. I have this now:
I created a hinge constraint between the wheel and the cart, and put the attachments at the same place. Then I added a weld constraint on the other side
What else do I have to do to make this cart working?
I also have this problem for some reason?
I have set all of the forces to 0, but this still happens?
Try adding friction to the wheels in the custom properties.
Did you set up the hinges correctly? Remember that you have to make one for each wheel, or you can weld the left side to the right side, and the Attachment1 must be at the same location as the Attachment0.
I believe I’ve done that, I’ve made 1 for a wheel and welded the wheel opposite to it with a weld constraint
There might be a couple issues.
The parts of the cart or tracks might have a Velocity in them already. Check the AssemblyLinearVelocity in all the components.
Another problem could be that if you used MeshParts or Unions for the wheels their shape might not be perfectly round because the flange and wheel would make a convex shape. Cylinders or Ball shaped Parts are best for any rotating parts. You can check out this plugin Mesh Optimization Tools - Roblox to see what the actual physcial shape of your meshes/unions are. If you set the CollisionFidelity property to Precise it may work out, but usually there are small wedges/flat areas that don’t work well as wheels.
Most cart systems also use Parts under and between the rails to keep them on the tracks.
Here’s a post I made a train model for a while ago to help out. How to make a basic train - #12 by Scottifly
Yes, I fixed it! It turned out the rails had a velocity in them. Also, another problem was that my wheels were a union, and the discs protruded out a little bit, which cut into the rails and glitched the cart. Thank you so much!
I have a new problem: how do I fix this
My character applies force to the cart when I enter it, how can I make it so that the cart will not move? (without anchoring it)
So we see here, its teleporting to the player’s orientation, but if we want the vehicle to not to teleport with the player, were gonna need more mass, because the player’s force is too strong. If its massless, theres going to be less mass and alot of speed but problems like that, but more mass will have less speed but atleast it wont teleport to the player because its not stronger than the cart.
I’ve tried adding more mass to the cart, but when I do the cart jitters a lot. Any idea why this will happen
I’ve identified the problem: For some reason the cart turns towards the player’s camera
I have no idea why this happens, is there a property that can be turned off to prevent this?
UPDATE: it was an easy fix, I just made the character massless.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.