Hinge Acting as Gyro

I made a vehicle system, but the hinge is not behaving as intended.

image

The hinge on the front wheels, when steering, the limits act like a gyro. Why does it happen, and how would I fix it.

2 Likes

Steering uses Limits Enabled to work.
image
Used a method like this before on a different system, so I’m confused why it’s not working now.

1 Like

Without the front wheels, it does not act as a gyro.

2 Likes

If there is no fix for this I am just going to recreate the whole system in a different way.

2 Likes

Speaking from experience, roblox constraints are extremely buggy once you try chaining them (e.g. hinges connected to more hinges)

I used a Motor6D for steering, and a single hinge for driving the wheels. Although Motor6Ds are rigid connections, they can still act like a servo in that they can have similar properties and behaviors

image

3 Likes

How would I go about creating a motor6d for steering instead?

Quite literally the same way you would use a regular hinge servo. You have to first make sure the Motor6D’s offsets (C0 and C1) are in the correct orientation since the servo will only rotate in a specific direction, which appears to be around the Z axis.
Whenever the player steers, you read the Steer value and use that to set the target angle of the Motor6D, which is always measured in radians
The .Velocity property will control how fast the wheel steers

3 Likes

I never knew Motor6D could do that. I’ll make sure to use these from now on

After doing that method, it worked better than before, but the steering is not working as intended.


Is any fix for that?

That video was really laggy, but basically it turns a bit, then “Slides” depending on direction.

I use cylinders

Is the wheel colliding with the chassis when it turns? Try using some NoCollisionConstraint to make sure the friction isn’t causing any problems

1 Like

Everything except the wheel has CanCollide off

The corroded metal sphere is the part that rotates with a Motor6D
The wheel is the only with collision
That gray part is welded to the sphere ( a hinge the grey part is ) and lets the wheel rotate

The car you presented in the video has suspension, but mine does not. I am wondering if this would affect the way this works.

Next thing I would check is the way the Motor6D is connected. Part0 should be the chassis and Part1 should be the wheels since the Motor6D will always animate relative to Part0. If you accidentally flipped them around then it could cause the entire chassis to rotate but not the wheels themselves.

If that still didn’t fix it, please send me the place file so I can test it myself.

chsaeis.rbxl (62.8 KB)

I tried switching the two, but it still didn’t work as intended. I have shared the place file with the truck on a baseplate, the Motor6Ds are in the Vehicle Seat and so is the control script

The cause was because the front wheels were not centered around the axis of rotation! It was offset by just a tiniest bit, but causes the wheel to wobble up and down when it drives, which gives traction issues. Here’s the fixed version of the vehicle:

chsaeis.rbxl (62.8 KB)

I tested and it did work thank you for helping on this problem

I made my wheels bigger, then it stopped working. I expected it to stop working, but the only problem is no matter how many times I aligned it and tried it different ways it still acted as before.

Here is model file if you can help
TRUCK.rbxm (20.7 KB)

Problem was the chassis is too light and it doesn’t build pressure on the wheels to steer. You can fix it by going through every part of the chassis and set their density to max to make them heavier
image


Also, side note, is there a virus inside your truck model?
image

image

I tried making the density max to all chassis parts, but it still behaved like this:

For the “Helper” script, I have no idea what or why but some random plugin is inserting random scripts into my game and disabling most plugins doesn’t help so I think it’s an actual, popular plugin that’s doing it

This also is not the full truck model that I gave model file for, so it might be a problem with it, so if you want this model I can give you this full model in the video.

Also, my chassis has always been massless (The Wheel parts) but the body itself is not, it worked before)

Make sure the wheels also have high density, but not as high as any of the chassis parts and it has friction. I would also double check to see if any of the chassis parts are set to massless because they shouldn’t be.

That sounds suspiciously like a virus. You have no idea which plugin is doing it. An innocent plugin is one that has nothing to hide and yours is definitely hiding. I would strongly advise you to get that checked out, there are loads of tutorials on how to find and remove malicious plugins

I turned off massless and made everything a high dense, but it still behaved like it did in the video.

I remember turning off all my plugins that allowed script injection, but the virus still happening which is odd, I’m not sure if plugins can insert scripts like that without script injection.

Edit:

Turns out it couldn’t’ve go forward in the video since the front wheel were colliding, but I fixed it. Now, it’s this:

I also have it centered this time, but still, no matter what I try this problem occurs it is really confusing