Search Unity

problem with rigidbody2D center of mass

Discussion in 'Physics' started by MN78, Dec 7, 2019.

?

can i fix this problem with out scripting?

  1. yes

    0 vote(s)
    0.0%
  2. no

    0 vote(s)
    0.0%
  1. MN78

    MN78

    Joined:
    Dec 20, 2018
    Posts:
    1
    Hi all, I have problem with center of mass.
    In this case ,my square have a rigidbody2D and value of center of mass is Vector2( 0, -1.6).
    when my square drop on ground with a little rotation in z axis (rotation.z is -15), not sleeping on right but quickly sleep on left.
    actually in want first sleep on right.

    notice: i can fix this with code but i want do this without code (For many reasons).

    are you have solution for this case?

    for understanding better of this case i uploaded some GIF.

    this is normal

    in this case i do that with code,but i want do this without scripting.

    i now soccer physics (game) do this without code, but how?

    Thanks.
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,500
    So for some reason setting Rigidbody2D.centerOfMass isn't something you can do in your project? You seems to be asking for an alternative that involves "no script" so I can only guess you're indirectly asking if you can change it in the inspector? As I'm sure you can already see, it isn't something that's exposed there so it leaves me wondering exactly what it is you're really asking for.