Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
I think you have no choice you need:
If (abs(delta)>180
then delta-new= (abs(delta)-360)*delta/abs(delta) else delta_new=delta
Delta in this case is compass_view - compass_car
Delta_new can than used as imput for the angle of the steering. But scale it by at least 0.5 else the tires will twist 180 (of they could) and you would still drive straigt forward ;-)
[(Compass1-Compass2)%2] - 1
I think one of the compasses needs an offset of 180.