Player mass forcing slight inaccuracy in vector force

I am trying to create a car that is powered by 4 VectorForce Instances.

Code Snippet:

	BasePart.FLVectorForce.Force = Vector3.new(((VehicleSeat.Throttle * forceMove) - (((forceMove/maxSpeed)*VehicleSeat.Velocity.Magnitude)/2)*VehicleSeat.Throttle),0,(forceSteer*VehicleSeat.Steer)*VehicleSeat.Throttle)
	BasePart.FRVectorForce.Force = Vector3.new(((VehicleSeat.Throttle * forceMove) - (((forceMove/maxSpeed)*VehicleSeat.Velocity.Magnitude)/2)*VehicleSeat.Throttle),0,(forceSteer*VehicleSeat.Steer)*VehicleSeat.Throttle)
	
	BasePart.BLVectorForce.Force = Vector3.new(((VehicleSeat.Throttle * forceMove) - (((forceMove/maxSpeed)*VehicleSeat.Velocity.Magnitude)/2)*VehicleSeat.Throttle)*-1,0,((forceSteer*VehicleSeat.Steer)*VehicleSeat.Throttle))
	BasePart.BRVectorForce.Force = Vector3.new(((VehicleSeat.Throttle * forceMove) - (((forceMove/maxSpeed)*VehicleSeat.Velocity.Magnitude)/2)*VehicleSeat.Throttle)*-1,0,((forceSteer*VehicleSeat.Steer)*VehicleSeat.Throttle))

My issue is that if the car is unbalanced, there is a slight drift depending on where the weight is coming from.

In this example, the player is causing the car to drift slightly to the left

My first assumption for a fix was creating new vector forces to hopeful equalize as much as possible (since the first one holy had one at the front)

Why are you using 4 VectorForces? I’ve never seen anyone here use that system so if you have an explanation of why you do it that way it’d help.

There are other options, like using 1 VectorForce to drive it, and a Torque to spin it.
Or just use HingeConstraints on the wheels to spin them.
Or use many of the tutorials posted on the forums about making a steerable driving car (with or without suspension).

My design was inspired from games such as Apocalypse Rising and Urbis.

Do they use 4 VectorForces for steering and throttle?
They may even just be moved with CFraming.

Maybe not 4, sorry this was just one of my attempts

Do the vehicles go up and down hills, or are they all on a level baseplate?

Here’s a sample of cars that I’ve built. They are all driven with HingeConstraints on the wheels, but if the entire game is flat you won’t need suspension like mine have. Tracked vehicle, suspension and racing tests. - Roblox

You can also get free model cars from the toolbox to see how they work, but BE CAREFUL of anything you find in them. Don’t run or test the game until you are sure that all scripts in it aren’t harmful.

Fixed, Just needed to check ApplyAtCenterOfMass

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.