Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Rigidbody Mass

Discussion in 'Physics' started by JamesLeeNZ, Jul 27, 2015.

  1. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,616
    So, as of this moment, I'm kind of agitated....

    I always operated under the belief that Mass was in KGs. Maybe it is, however someone on reddit noted the value should be between 0.1 and 10.

    At first I thought bs... but...

    http://docs.unity3d.com/ScriptReference/Rigidbody-mass.html

    Is this a new thing? I admit I havnt looked at Unity Docs around rb mass in years, but I dont recall ever reading anything like that previously.

    Im looking for comment from someone who works at Unity ideally and has access to the source.. Wondering if I need to go back and revise EVERY rb setting Ive used in my games. The values work, but if they are making the engine work harder for nothing they probably need sorting.
     
  2. grizzly

    grizzly

    Joined:
    Dec 5, 2012
    Posts:
    356
    I think it's just poorly worded. 0.1-10 is probably the ratio that should be maintained between two or more colliding/connected rigidbodies. Mass ratios greater than this will result in things flying into space.
     
    Last edited: Jul 27, 2015
  3. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,616
    Yes, I do recall reading something along those lines back a ways that mass shouldnt vary by large numbers, that I already knew, and was fine with, because I based everything on real world'ish numbers.

    ie.
    Jeep:1000 (assumed kgs)
    Artiliary: 2500
     
  4. grizzly

    grizzly

    Joined:
    Dec 5, 2012
    Posts:
    356
    Yup, I'm sure it was worded better in earlier docs.
     
  5. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    The docs have always said exactly that. As they say, large values can lead to instability (due to floating point limitations) so ideally mass should be somewhere around 1.0.

    --Eric
     
  6. Woodlauncher

    Woodlauncher

    Joined:
    Nov 23, 2012
    Posts:
    173
    Strange, Anthony Yakovlev said in the WheelCollider thread that the default WheelCollider settings work best with a mass of 1500kg.
     
  7. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,077
    I use real masses in my stuff and it's fine: http://www.speedboatsim.com

    As someone else said, it's more about ratios of interconnected or colliding bodies. You can't expect to set a Mach truck on top of a ping-pong ball and have it work nicely.
     
  8. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,616
    I too use real masses, and its fine. Its not what the docs suggest you should do though. Could just be a case of the docs being up to the typical docs standard (lacking).

    However, my main concern is working the system harder than it needs to. Be nice to have official comment from someone who works in the physics engine, on whether this is a docs are wrong (poorly worded) issue or not.
     
    NotaNaN likes this.