Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

[2018.1.0b9+] Adding velocity of rigidbody2D to another increases the original instead

Discussion in '2018.1 Beta' started by noonoox, Mar 11, 2018.

  1. noonoox

    noonoox

    Joined:
    Nov 15, 2014
    Posts:
    21
    In my game, I have a type of gameobject that keeps track (in a dictionary called "contacts", where the key is their collider) what rigidbodies are currently inside of it. When a relevant gameobject enters its trigger, it will add their rigidbody2D to the list and then call:

    rb.velocity += contacts[other].velocity * bounce;

    but strangely, in the current version of Unity (pre-beta didn't do this), the call doesn't change the calling object's velocity and instead just multiplies other's rigidbody's velocity by whatever bounce is! (ie: if it was going 10 when it entered & bounce was 10, it would leave at 100)

    In other words, contacts[other]'s velocity is the one that increases.

    (Repost from Unity Ask)
     
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    If the same code works with an earlier version of Unity and stops working with a beta build, you probably found a regression.

    In this case, it would probably be helpful for Unity Technologies if you submit a bug-report, following the advice given in this document.

    Once you submitted the bug-report, you receive a Case number, which UT normally asks us to post in the forum thread, which allows them to pick up your report faster.

    If you found a bug in Unity, it's recommended to submit a bug-report following the advice given in this document.

    Using the bug-reporter seems to be an important step, because it makes sure the report is in Unity Technologies bug-tracking pipeline, has to be processed at some point and you can kind of track if it's fixed. Using the forum is often used to add to a little more attention to a bug-report, but does not replace submitting the bug-report.

    It's from advantage to attach a project to the bug-report that UT can use to reproduce the issue and test their fix against. Attaching a video to the bug-report that shows how to reproduce the issue and the issue itself, has been proven useful too.

    The easier an issue can be reproduced by QA, the more likely it is to get forwarded to a developer, who might or might not work on a bug-fix for that at some point.

    After you submitted the bug-report, you receive a confirmation email with a Case number. UT often asks us to post the Case number in the forum thread, which allows them to find that bug-report if they look at your post.

    Following these steps will increase the chance that UT is looking at your issue tremendously.
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,481
    Yes, please submit a bug report ASAP. If you can post the case number here I can take a look at it immediately too.

    Thanks!