Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm rehearsing on Box2D revolute joints. Everything's going pretty well except for one thing. For some reason bodies joined together with revolute joints do not stay sticked, they start getting apart from each other from the app start when I run it on retina device or simulator. On non retina device it works just fine, as expected. Here's the screenshot of the non-retina version:Non-retina

And here's the behavior when I run the same app on retina device/simulator: Retina

I'm taking content scale factor into account.

share|improve this question

Ok, I've finally found the reason for the wrong behavior on retina display. The problem arose from the fact that although I was taking care of the content scale factor in the other parts of the program, I was not taking it into account when initializing joint definitions. It used to be like this:


This way the joints did not work properly and bodies were "seesawing" around some other point. After I changed the code to this:


everything worked as it should. Note that the SCALE_FACTOR is a macro I've defined in a header file that simply takes the current device's content scale factor, which is 2 in retina display and 1 in non-retina one.

share|improve this answer
You should probably this to just the rendering system so you're not actually changing the positions of things depending on if you're on a retina device or not. – Tetrad Apr 12 '13 at 4:59
Yes, definitely follow Tedrads advice here. Don't scale your physics, only your graphics! Otherwise you end up with different simulations alltogether (different sizes means different mass, etc.) – bummzack Aug 10 '13 at 7:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.