Donnerstag, 29. November 2012

CryAckermann (in short)

Ever wondered how the vehicle steering is implemented in CryENGINE? Actually there is nothing really special about it as it simply uses a well known steering geometry implementation: Ackermann Steering.


The more interesting part is how you can use it to define which wheels or axes are steering in CryENGINE. By the way: You shouldn't use more than 18 wheels as this is the default maximum amount of wheels supported. But that should definitely be enough for 99% of the usual game scenarios. So when applying an Action to a wheeled vehicle in CryENGINE you can always define an Ackermann Offset which defines the wheels/axes steering the vehicle. Using an Ackermann Offset of 0 (default value) will set the front axis wheels as the steering wheels. Setting the Ackermann Offset to 1 will use the rear axis wheels as the steering wheels. The most funny setting is obviously if you use an offset of 0.5 which enables steering with the front and rear axes.

You can easily test it in the available CryENGINE 3 FreeSDK. Unpack the Scripts.pak inside the Game folder and open:

Game\Scripts\Entities\Vehicles\Implementations\Xml\HMMWV.xml

Search for the ArcadeWheeled tag and add a new attribute called: ackermanOffset="X.X"
Setting it to either 0.0, 1.0 or 0.5 will have the steering effect mentioned above.