Hello everyone. I’m continuing development on my raycast suspension chassis and everything is going well so far, I just finished getting the springs to hold the vehicle up and dampen. I’m using VectorForces instead of BodyThrusts.
Now, all I need to know how to do is forces - but I don’t know how to apply them to Roblox. I’ve found this gold of an article - Car Physics
But some of the most important equations here like friction, drag, etc don’t apply well to Roblox (at least for me) and either cause your chassis to fling around or glitch out. The explanations are somewhat understandable, though.
I just need some explanation on how to code these forces nicely for my car and I think I can handle the rest:
- Drag (optional, not sure if I need this but I’d like to learn if anyone knows.)
- Calculating torque curves to stimulate gear transmission (not really sure how this works at all. I think this is the term but what I’m trying to say is gearing.)
Also I have an idea of how these work but I’m just not able to apply it to Roblox. That is what I need help on.
I’ve only found one way to do friction, which is what the default Jeep uses (Sets the MaxForce of a body position when you’re not throttling), but this doesn’t work well when the car is driving since there’s no friction on it. It’s only intended to work when the throttle is let go.
I also have a few more questions while I’m at it.
People typically Weld/Motor6D wheels to the thrusters and then change the C0 of the weld to make it look like the wheel is touching the ground. This is completely fine on the client, but how would I replicate this to other clients efficiently? I’m pretty sure that doing this on the server can be REALLY intensive, but it seems like the only way to get it to replicate without looking too bad. Does anyone have any ideas on how I should replicate wheel C0’s efficiently? Or does anyone have another method?
People who are experienced with raycast suspension, how do you handle network ownership of each car and make sure everything is replicated correctly while looking good? Like I said before, the thing I’m most concerned about are wheel CFrames.
Where should I be applying the forces listed above? In the center of the chassis or in each thruster? Or both?
I would really, really appreciate help. I just need help and explanation on these and I think I can continue from there once I get an idea of how to control these forces with my chassis.