I'm using box2d for physics simulation. I'm moving a circle using arrow keys by applying impulse on the body when ever a key is pressed. Unfortunately, the circle moves excruciatingly slow and doesn't seem to accelerate like a true physical body is supposed to.
My world's dimensions are 400x800 pixels. The radius of the circle body is 20f.
According to this, the problem can be solved by scaling the circle radius down when creating it and scaling up after getting the body position during painting. It doesn't seem to make any difference at all. Is there some step or setting I'm missing here ?
Code on pastebin
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…