How do i make the cars steering low when the angle of the cars vision is relatively or nearly straight to target?

So my car has a system where it has a script where steering is by value, but i want to add one value that divides it like, not even close to straight? then do nothing, however if it does get close to straight, then do something like. SteeringValue/BalanceAngle, something like that but i don’t know what script line does it use? dot product or something? if you don’t understand then i will you give you a simple explaination.

1 Like

You could tween the value instead

Just use a percentage of the distance from the circle to the straight line

no but like i meant like how do i code the angles to decrease on a numbervalue?

this makes no sense. Do you mean the steeper of the angle, the lower the steering? And if so what is the max and minimum angle, and max and min of steering?

You didn’t really explain it well. Also, if you reply to yourself in your posts it doesn’t give an alert to the person you were replying to.

You say the “original value” is 20.5, but that’s just a number to us. Do you mean the maximum value the steering is supposed to turn?

How are you steering the car, mouse, input from a keyboard, input from a controller?
Are you trying to make the steering angle less sensitive near center and more sensitive when steering sharp?
If you just have 1,0 and -1 as the input values you can’t do much, other than change the speed that the steering actuates at.

If your input is a variable number (it can be anywhere between 1 and -1 then you can use a sine wave formula to change the value as an arched curve to make it less sensitive at close to straight steering, or more sensitive at the max steering angle.

no im just trying to make Car AI that can go straight when on a straight angle but i need something like a value that divides the steering value when its relatively close to the straight angle.