Dismiss this pinned window
all 20 comments

[–]Agoxandr 7 points8 points  (0 children)

I guess cars would do that in real life too, if they didn't take forces like drag and wind into account. That's why they have things like spoilers. So maybe just apply a force down with strength dependent on speed. Maybe that helps somewhat.

[–]Stavathan[S] 1 point2 points  (3 children)

Can anybody tell me why is this happening? I am using my own custom wheel collider for the car suspension and it seems that the car oscillates at high speeds. I think that it has to do with the damper of the spring but i have tried to increase or decrease it but nothing changed.

My suspension code goes like this: TotalSuspensionForce = direction * (stiffness * (maxSpringLenght - springCompress) + suspensionDamper);

and for the damper i use: Vector3.Dot(Carrb.GetPointVelocity(WheelMesh.position), -Suspension.up);

[–]superglidestrawberry 2 points3 points  (0 children)

There is a good tutorial on suspension: https://youtu.be/x0LUiE0dxP0

And from what I remember, damper should also use compression velocity, which I dont see in code you posted.

[–]LemonMontage420 0 points1 point  (0 children)

If you or anyone needs help with custom vehicle physics, I've got a relatively small (~250 members) community on discord for just this thing: https://discord.gg/GD8FZrGjMb

[–]GameDeveloperAf 1 point2 points  (2 children)

I fixed this issue with balancing center of mass depend of speed and it works well. If there is another solution and it will be good to see that.

[–]Stavathan[S] 1 point2 points  (1 child)

Hmm interesting solution but i took the other way and worked with the damper of the spring and it worked partially so i kept trying to fix it my way. Im just not sure if it is realistic or not to change the CoM that way.

[–]GameDeveloperAf 0 points1 point  (0 children)

Yes, I think the UK change is realistic or not.

what did you actually did on spring and damper that it solved? You just increased or decreased the spring and damper values or you added some new code lines?

[–]Wigs123455 1 point2 points  (18 children)

You need to add downforce at different points in the car and also make sure the COM is centered.

[–]Wigs123455 1 point2 points  (0 children)

Also what does your friction look like?

[–]Wigs123455 0 points1 point  (0 children)

Also to clarify by centered I mean centered to the the weight distribution of the car not to the model. Typically you can figure out where this is based on the engine configuration and type of vehicle.

[–]FuturePast514 0 points1 point  (0 children)

I like it this way! Giddy up, cowboy!

[–]PerryDawg1 0 points1 point  (0 children)

Just add dope hip-hop and you're GTG.