Has made Tank Physics with Procedurally Generated Tank Tracks!
Quick (some) Explanations on how it works,
The Tank Tracks Animation (Doesn’t rely on Physics) and Generation utilizes a combination of bezier curve and other math formulas, which if I’m honest is really unpleasant to stare at and edit. It is also, done on the client!
The Tank Tracks alone is around, ~300 lines of code! Which, in my opinion is… Insane!
Video of the Tank Physics in Action!
There’s still ofcourse, some flaws! Like, the tank LOVES to lean forward towards the ground whenever it gets the chance too…
Performace Report (StreamingEnabled Off)
(Android Mobile)
4GB Ram,
8 Cores,
Qualcomm SM6225 Snapdragon,
Redmi Note 11
1 Tank Test Report, ~60 FPS
10 Tanks Report, ~40 FPS
That’s all I’m gonna say for now, any feedbacks and suggestions is what we’re aiming for! Cheers!^^
You are very right! It is really… and i mean… REALLY alot of work… ~350 lines of code of PURE calculations, and it’s not fully finished yet… i can’t really explain in Details how it works, BUT… like i mentioned, it’s Bezier Curve, mixed with some other Math Formulas that i definitely forgot what it was
It’s like a 2D grid, it’ll get the Length of ALL the wheels, from the Start to End, after that, it uses simple calculations to determine how much Individual Tank Tracks needs to be Stacked to Cover the Whole Length… and ofcourse, sometimes it overshoots due to the smaller digits in length (0.2873748, etc) which causes it to create more Tank Tracks than what’s needed, and those Tank Tracks usually just wraps around the Wheels in a Circle which looks… odd.
I can probably give an more detailed Explanation when i have the free time. Cheers!^^
It’s only the wheeels on top (the gear shaped thingy, and the other one on front) that’s spinning FAST FAST… it’s because there’s no friction since it’s not touching the ground… the rest of the wheels Is fine though!
This is really cool! I am trying to make something similar for ages now but can’t make the tracks’s movement along the curve align smoothly with the wheel’s vertical movement (the suspension), since the length of the curve changes when that happens. How did you pull that off? It looks amazing
I do not know the full math behind this sadly, since my friend did most of it…! BUT, when i have the free time, I’ll probably reach back to you to explain in Details on how it works! (after i reverse engineer it)