- Home /
HingeJoint2D physics different between editor and build (see images inside)
Hello everyone,
I have ropes in my 2D game which are exactly as expected when I play in the editor, but become weird when I build the game for PC. See pictures below: the ropes are different in the PC build.
For the ropes I use hinge joints 2D between line renderers with rigid bodies 2D. They follow physics rules and have their extremities kinematic so they don't move.
Does anyone have a clue why this may be happening?
In editor mode:
In the build version:
what platform did you build for? if your framerate is bad try removing costly operations because it might reduce how often physics is updated. I'd it's good try increasing the physics timestep.
last option though sounds counterintuitive at first. if running low on FPS, try decreasing physics timestep.
Hi hexagonius!
Thanks for your comment, the build is for PC. Fortunately I have no problem with the framerate. I have a problem with my ropes not behaving the same in the editor and in the build.
Answer by GiyomuGames · Oct 13, 2015 at 11:25 PM
I found the solution for this. I had to go in my Physics2D settings and increase the positions iterations and velocity iterations until I got what I wanted. Eventually I multiplied the original values by 10 and can't see a difference in CPU usage.