Search Unity

Question TrackMania physic in unity

Discussion in 'Physics' started by Waterlok, May 27, 2023.

  1. Waterlok

    Waterlok

    Joined:
    Sep 13, 2021
    Posts:
    2
    I was looking for how to make a physic who if she has the same parametre she will do the same thing (like trackmania) in unity. So I would like to know how to do it and how this type of physic is called
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
    Start by making a car, then change the forces (don't forget downforce to make it stick to the ground better). Maybe change gravity as well. It's just tuning
    Unity also got wheel colliders, but never used them myself
     
  3. Waterlok

    Waterlok

    Joined:
    Sep 13, 2021
    Posts:
    2
    Hi I think I was not clear. What I want is not create a game like Trackmania but have a physics behavior like Trackmania on the fact that in the games if you do the same input on the keyboard its will do the same thing in the games.

    If it's not clear enough says me I will try to be clearer
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
    When I looked ip'unity racing ghost' I got many results on this. Haven't done it myself however
     
  5. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,929
    This is called deterministic physics. Same simulation input -> same simulation output.

    If you want the simulation to be the exact same in the same machine, given the same input, you can enable "Enhanced determinism" in Unity's physics options:

    https://docs.unity3d.com/2022.1/Documentation/Manual/class-PhysicsManager.html

    Note however this doesn't guarantee determinism if you perform the same input on different devices/platforms. This is because PhysX (the physics engine used in Unity by default) is not fully deterministic.

    kind regards
     
    Edy, Reaktion and DevDunk like this.