Search Unity

Why Rigidbody2D gameobject automatically translating to Vector2.zero itself

Discussion in 'Physics' started by spark-man, Sep 8, 2015.

  1. spark-man

    spark-man

    Joined:
    May 22, 2013
    Posts:
    96
    Hi everyone :)

    Mystery bug occurs once a while. I mean my project work perfectly as i need at most of times.

    In my scenario, Series of rigidbody2d ball is shooted by using Ball_Rigidbody2D.AddForce(dir*speed); .

    Ball usually hits the wall and bounce little bit, then falls down on floor.

    But in rare case when it hits wall it automatically translate to Vector2.zero itself

    If i leave it to occur in loop then it will hit very bad Physics2D.Simulate in Profiler. Later lags like hell.

    please watch this video to get clear idea on bug:


    Im noob but Im aware of few basics physics rules that rigidbody should not be translated via script. If isKinematic is enabled we can translated via script.

    I googled a lot to solve this issue, but sadly didn't found any solution. Please help me to fix this bug.

    Thank you in advance :)
     
    Last edited: Sep 8, 2015
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,428
    Not sure, it may be related to a bug fixed at the beginning of this month. See here.
     
    spark-man likes this.
  3. spark-man

    spark-man

    Joined:
    May 22, 2013
    Posts:
    96
    Ok. Im in Unity 5.1.0f3. Downloading new Unity 5.2. Let me check in it.

    Thanks :)