Update
Video for the new update to highlight new features:
Just for clarification, new tank is based on Russian T-26 light tank from pre-WW2 years, but suspension is slightly different and re-assembles one from modifications of German Panzer I tank.
- New tank/tracked vehicle model is based on assembly of various components rather than a single monolithic class. This simplifies refactoring and gives more freedom in configuration of the tank.
- Track friction model is now based on CollisionHit events of various parts that build up the track. This means that any part of the track, including sprocket and idler can provide traction with the ground. Previously it was limited to road wheels which are pushed by suspension spring and suspension spring had to be made using custom component. Now you can assemble moving parts of suspension using physics constraints which allows to build pretty much any kind of suspension not limited to a linear springs.
- Tracks now have a mechanical friction, which will slow down their rotation without torque coming from the engine and require some minimal amount of torque to start moving from full stop. You can see how “from still to rolling” transition is now more aggressive than a very slow smooth rotation of the tracks as it was before.
Know issues:
- Version on repository has a bug in implementation of mechanical friction function, where delta time is not taken into account, which changes acceleration rate of the vehicle at different FPS
- CollisionHit events usually happen on edges of surfaces which can push one wheel to the left and next wheel to the right, this creates inconsistent behavior of the friction when driving over the flat surface in straight line
- Some of the collision shapes of track are a bit rough which can lead to unnatural collision of the “wheel” with the ground
- There is a small jittering from the friction when vehicle is standing still
- Suspension is not completely tuned and is too stiff but overall represents the concept of how multi-body suspension can work
As always, you can find full source code on GitHub repository: https://github.com//MMT_Content
and latest compiled executable is here: Dropbox - File Deleted - Simplify your life
[Temporary Controls for T-26]
To reverse, hold Shift key while holding W
W - move forward
A/D - apply brake to left/right track for steering
S - brake both tracks
To get over the vertical obstacle in front of the vehicle on the demo level, keep holding W until tank gets enough grip, it might take few seconds.