TomashuTTTT7 / TM-AlgoCrack

Attempt to analyze and writeup trackmania tricks
GNU General Public License v3.0
26 stars 4 forks source link

How does TMNF work? #4

Open xLOKRAYx opened 1 year ago

xLOKRAYx commented 1 year ago

Hi, Im trying to make a Stadium car controler on Unity but i dont have enought info about how the game really works. Ex: Does the game actually detecs friction between the road and each wheel, and apply a torque in the posithoin on that wheel (Unity's wheel colliders) or the car is just an empty object in which they apply forces based on your inputs? I saw you said you got the info applying reverse engineering . How can i do that for a personal divulgation purpose. Thanks in advance.

TomashuTTTT7 commented 1 year ago

Hey, reconstructing TMNF physics would be pretty challenging, i am not able to cover everything here and now. But in general trackmania computes forces and applies them to the car's center of mass, and it also computes torque and it applies it to the car's origin. Torques and forces are computed based on wheels states, velocity, angular velocity, inputs, internal state, and other things. Trackmania doesnt have realistic physics, so it doesnt use real life formulas for e.g. friction. It has some predefined functions(graphs) that e.g. return acceleration force based on speed. Reverse engineering is a whole different story and i cannot give you details about it. Good luck.