Hello!. after a few days of reworking and tweaking i can finally introduce my simple track system for
public use!.
my first time releasing something to the public so feel free to tell me some feedback and advices so that i can improve in the future
What this system does is generated a dynamic tank track using code instead of letting the physics
engine handle it. making it more less glitchy and performant that traditional constraint tracks. it also includes a basic LOD system so it will not render tracks that are too far away.
.
.
(updated the link, i pasted the wrong link )
tell me if there’s any issues!
19 Likes
Pretty cool and smooth movement.
Can you make a drivable tank chassis where the tracks move relative to the speed you are driving?
I kicked up the speed and it looks nice!
1 Like
Exactly what I have been looking for, a great learning material
1 Like
sure here, https://create.roblox.com/store/asset/99298244235237/Test
and add this code to the wheelspeed function inside the track module script (if you deleted the commented out code)
for i, v: BasePart in ipairs(wheels) do
local actualwheelpart: BasePart = v:GetJoints()[1].Part0.Parent.Wheel --or the actual wheel part thats spinning
if actualwheelpart.Parent.Name == "DriveWheel" then
local dot2 = vector.dot(actualwheelpart.AssemblyLinearVelocity, v.CFrame.LookVector)
spd = (actualwheelpart.AssemblyAngularVelocity.Magnitude * (actualwheelpart.Size.Z/2)) * math.clamp(dot2, -1, 1)
end
end
This is a lifesaver. It’s almost perfect for what I needed, although the reset in the cycle is pretty noticeable at low speeds (and with materials)
2 Likes
that’s amazing!. i forgot to mention the downside of my track system is that all the track parts must look EXACTLY the same or else that happens
1 Like