Unity Community


Page 1 of 2 12 LastLast
Results 1 to 20 of 28

  1. Posts
    117

    Physic Car Setup Tool

    Hi all,

    Many people asked me about the Physic Car tutorial and I must say I'm writing now, but I have little time, so be patient.

    In the meantime I've made a kind of tool for a physic car setup, It has sliders for more interesting parameters in two sections:

    Car section to the left with sliders for suspension, tyre stiffness, power engine, etc.

    AI section to the right with thrust and driving sensitivity.

    Also there are three cameras, a classic follow camera (by default), an on board camera and an interactive camera. When you select this last one, the offset parameters appear under the AI section.

    I think this is a good way to know how different parameters affect car behavior. Please try carefully at first and look for reactions.

    You can drive and leave the track pressing "i" to test in an off-road fashion.

    The values exposed next to the sliders are real world values, it means you can use what you see in your code.

    The final tutorial will have explanations on those parameters but will not include the interactive part (sliders) nor the AI, just the basic script where you can tweak the values.

    The car model is a De Lorean I found for free in Turbosquid, if anyone knows any problem with that please tell me and I'll change.
    The car is at real scale 4,2 metter long.
    The track is based in the Infineon Raceway.

    http://3dnemo.com/games/release/056_CarTool.html

    Edit:

    Controls are:

    "c" change camera
    "i" AI on/off
    "Space" brake
    "r" return to the track


    Please tell me if you find this interesting to continue improving.

    Thank you and enjoy.
    Attached Images  
    Thanks God, back in Mac.


  2. Location
    Happy Land!!!
    Posts
    1,003
    Neat stuff you have. I'll try it later.

    If I got that car up to 88 mph, would it disappear in a flash of light.
    In Soviet Russia, game develops YOU!


  3. Location
    MamborÍ - ParanŠ - Brazil
    Posts
    263
    Very Nice...

    I can't wait for the tutorial
    SIMBRA - Brazil Simulators
    Dynamic Games Entertainment
    www.simbrabr.com.br
    www.dynamicgames.com.br/en
    www.transportandoobrasil.com
    My Games on Google Play Store - Super American Racing - Touring Racing - Classic Prototype Racing

  4. Unity Product Evangelist
    Location
    San Francisco CA USA
    Posts
    6,186

    Re: Physic Car Setup Tool

    Interesting, I was hoping that the default settings would be drivable right off the bat and when I cranked up the power and all it seemed to drive more like a SeaDoo/Jet Ski than a car.


    Quote Originally Posted by ikiman
    The track is based in the Infineon Raceway.
    Nice! But you left out some of the best parts, notably the elevation changes as that makes it such a fun track. Oh, and you're having us run it backwards by default. I know this as I've spent a fair amount of time in the saddle at "Sears Point" (I won't call it Infineon! ) and I worked there for over a year in high school (having grown up in Sonoma).

    photo proof

    (cresting the hill in turn 2, exiting turn 9)

    </off-topic bragging>
    Tom Higgins - Product Evangelist at Unity Technologies ApS
    unity3d.com | answers | blogs | feedback


  5. Posts
    147
    Very Interesting!!!!

    Is the scripting JS or C#. Since JCar is out and is in C# it would be nice to see a good Car physics script/tutorial in JS.

    Also are you using the Unity Wheel Colliders along with there friction curve?


  6. Posts
    117
    • theinfomercial wrote

      If I got that car up to 88 mph, would it disappear in a flash of light.


    Not yet, I have the flux capacitor still under development.

    • HiggyB wrote

      Interesting, I was hoping that the default settings would be drivable right off the bat and when I cranked up the power and all it seemed to drive more like a SeaDoo/Jet Ski than a car.


    I changed default settings, it doesn't looks like a SeaDoo anymore (at least I hope so, but Tom, it's your wheel colliders ). Also I added some brake zones and now the lap time is in the 1 min 15 sec range.

    • Nice! But you left out some of the best parts, notably the elevation changes as that makes it such a fun track.


    Unfortunately I didn't have that info, I'll work it a little more.

    • Oh, and you're having us run it backwards by default. I know this as I've spent a fair amount of time in the saddle at "Sears Point" (I won't call it Infineon! )


    Corrected the run direction, and sorry, all references pointed me to "Infineon" as the right name but, from now on, it will be "Sears Point".

    • Vern_S

      Is the scripting JS or C#. Since JCar is out and is in C# it would be nice to see a good Car physics script/tutorial in JS.

      Also are you using the Unity Wheel Colliders along with there friction curve?


    The script is in JavaScript, and yes, I'm using wheel colliders, but I'm not tweaking the friction curve as I found unexpected behaviors, I'll try to understand deeply that part, but it requires a lot of time and test, so that values are by default.
    Thanks God, back in Mac.

  7. Unity Product Evangelist
    Location
    San Francisco CA USA
    Posts
    6,186
    Quote Originally Posted by ikiman
    ...and sorry, all references pointed me to "Infineon" as the right name but, from now on, it will be "Sears Point".
    FYI, Infineon Raceway is its proper and correct name, I'm just being an old curmudgeon wanting to call it by the name used when I was a kid, Sears Point. So you were correct, I was just having fun... (as I was with the elevation bits too). It's just a track that I personally have a lot of history with so I tend to get chatty about it.

    Oh, and yeah, those wheel colliders... :P
    Tom Higgins - Product Evangelist at Unity Technologies ApS
    unity3d.com | answers | blogs | feedback


  8. Posts
    383
    Heya ikiman,

    Very very nice!!

    This car feels like the most realistic handling I've seen so far in Unity....any chance of sliding/drifting though? It would be wonderful to get some drifting and fish tailing going on...on road and off road.

    Any idea of what you will charge for this? Timeframe?


    Cheers


    Jeff


  9. Posts
    117
    Updated webplayer with raceway modified. Now it looks a lot more like Infineon Raceway (formerly known as Sears Point Raceway).

    Added some in screen controls like sound volume and some graphic options.

    Enjoy.
    Attached Images  
    Thanks God, back in Mac.


  10. Posts
    63
    Pretty impressive! I like the skidmarks

    Two questions:

    1. Is it possible to keep the throttle on, even if the car starts to oversteer? It feels like limites slip differential kicking in or something... I want nice oversteer through the corners

    2. Is it possible to turn off the force that keeps the car on it wheels and prevents from rolling over?

    Other that those things, feels superb! :P


  11. Posts
    117
    Hi Tri3,

    I'm still working on it and some drift is a popular claim, but it's not a part of the wheel colliders design on it's own, so it must be made by code tweaking carefully front and rear wheels friction. I will include that soon.

    About the force that prevents to rolling over, there is no such thing, try with the side friction slider and you will see. But you are right in part, to make the car more steady, the rigidbody angular drag is in high value (2). To simulate a crash with a lot of car flip, that must be changed on the fly along with the center of gravity. Also I'm working on that part.

    And thanks for the comments.
    Thanks God, back in Mac.

  12. Jon Jon is offline

    Posts
    65
    Is this supposed to happen?
    Screenshot: http://kttns.org/guzz


  13. Posts
    117
    Hi Jon,

    Yes, it is when you go to max power engine (as I can see in your screenshot), think that's not a finished setup nor a game so still needs some adjustments for things like extreme collisions.

    The webplayer is intended mainly to see what happens when you change physic parameters in the car using wheel colliders, so you can adjust values for your own development.

    But, as I said, I'll improve it as I receive feedback from the community.
    Thanks God, back in Mac.


  14. Location
    Poland
    Posts
    20

    Download ?

    Any chance to download ?


  15. Posts
    147
    Quote Originally Posted by ikiman

    I'm still working on it and some drift is a popular claim, but it's not a part of the wheel colliders design on it's own, so it must be made by code tweaking carefully front and rear wheels friction. I will include that soon.
    By code tweaking wheel friction are you referring to adjusting slip, value, and stiffness? Basically changing the shape of the wheel friction curve depending on factors such as speed, steering angle, directional magnitude, etc.

    I am working on a set up where I can adjust every input of forward and sideways friction based off of the above factors and I am seeing much better results by being able to alter the wheel friction curve to better suite the situation.

    I do not believe a single setting is capable of fulfilling all situations and I think that is where most people get frustrated using the Wheel Collider.

    I started a discussion a few weeks ago on the wheel collider if anyone would like to chime in.


    http://forum.unity3d.com/viewtopic.php?t=26405


  16. Posts
    117
    Hi Vern_S,

    Yes I talk to adjust dinamically the stiffness factor (forward and sideways) depending mainly on speed and steer.

    At first I was affraid on messing up the physic engine with that, but I found little problems on doing it, you can see some of that in action in my page, try Sprint Cars demo that features a controlled sliding in turns.

    But I think there is a misconception with a car setup. In real world cars are designed for a specific task so a Nascar has nothing to do off road.

    What I found is people try to setup an all-road car capable of great stability at high speed but with high and soft suspension and with lovely drifting in turns, that's not possible,

    By the moment I can say wheel colliders do the job very well, but a lot of research must be done.
    Thanks God, back in Mac.


  17. Posts
    37
    I love it,the update you did on the track area textures in that pic looks really great.It reminds me of grand turismo,yeessss,hehe.
    any chance of changing the camera so you have multiple angles like bumper,driver etc?


  18. Posts
    117
    Hi jojimbo,

    Press "c" twice and you are in interactive camera mode, move the camera where you want with the sliders in the lower right corner.

    And don't forget to press "i" if you want to drive.
    Thanks God, back in Mac.


  19. Posts
    246
    Will this be available for download or sale? If for sale, an affordable price?


  20. Location
    Belarus
    Posts
    721
    Hello, ikiman!

    I have a question to the vehicle-Guru:
    When I use wheelcolliders, wheels fall through obstacles - which is not nice (if I drive on a pile of rocks - only the middle-part of the wheel collides). Could you give any advice how to fix that?
    Maybe using 2 wheel colliders for each wheel (on the left side and on the right side) or attaching a spring on each side of the wheel? Thanks).

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •