Search Unity

DistanceJoint2D not working.

Discussion in '2D' started by Tibor_coder, Oct 20, 2020.

  1. Tibor_coder

    Tibor_coder

    Joined:
    Mar 27, 2020
    Posts:
    26
    Hi, am changing the DistanceJoint2D's distance attribute through script. However, the effect isn't seen in the game. I can see the change in value of the DistanceJoint2D's distance attribute in the inspector, but not in the game. When I manually input the distance value in the inspector everything works. Any ideas on why this is happening?
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,499
    Joints haven't changed in long time so not sure why you'd get this. Are you absolutely sure your script is referring to the same joint? Beyond that I would suggest submitting a bug report with a simple reproduction case and send me the case number.