Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
Logic - Ackermann steering
   
Award
Favorite
Favorited
Unfavorite
Tags: v0.3.5
File Size
Posted
70.582 KB
14 Aug, 2018 @ 2:17am
1 Change Note ( view )

Subscribe to download
Logic - Ackermann steering

In 1 collection by Tajin
Logic Examples & Knowhow
54 items
Description
Example vehicle for ackermann steering.


All you need is a 2x2 function block for every steerable wheel, using the following function:

( atan2(x,y) - atan2(abs(y)*tan(-z*pi/4)+x, y) +pi)%pi2 - pi
x = X position of the wheel relative to the desired center of rotation (+ right, - left)
y = Y position of the wheel relative to the desired center of rotation (+ front, - back)
z = -45° to 45° steering input (-1 to 1)

You can either set X and Y via number blocks or replace them directly in the function. (this way you could also use the small function block since it then requires only 1 input)


The example vehicle here uses number blocks.
You can set X/Y in whatever unit you like as long as they both use the same unit.
1 Comments
Tajin  [author] 8 Apr, 2019 @ 8:29am 
Theres is now also a microcontroller available to simplify things a bit:

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1673117927