I have two problems with my OpenGL ES Android application running the java port of Box2D
My first problem is that the processing is very, very slow. I am running step with these parameters:
With these settings, the game appears to run in slow-motion. I can make the game process faster by reducing the step to 30FPS but this limits the max velocity (something I don't want). The processing usually handled at about 16-23ms, I know this shouldn't isn't correct but based on my research this isn't the cause of my problem.
My second problem is that Box2D is not changing body rotations on collisions. If I manually rotate the body and attempt to collide on an angle, the hitboxes are correct.
This image is a result of the rotated box being dropped and falling due to gravity

For both bodies: mass=1, density=10, and friction = 1.3
My first problem is that the processing is very, very slow. I am running step with these parameters:
Code: Select all
float timeStep = 1.0f / 60.0f;
int velocityIterations = 10;
int positionIterations = 10;With these settings, the game appears to run in slow-motion. I can make the game process faster by reducing the step to 30FPS but this limits the max velocity (something I don't want). The processing usually handled at about 16-23ms, I know this shouldn't isn't correct but based on my research this isn't the cause of my problem.
My second problem is that Box2D is not changing body rotations on collisions. If I manually rotate the body and attempt to collide on an angle, the hitboxes are correct.
This image is a result of the rotated box being dropped and falling due to gravity

For both bodies: mass=1, density=10, and friction = 1.3