[SOLVED] box2d problem on Android

I’m having some problems with B2RevoluteJoint on android. For some reason motors don’t work.
Here is my code

var motor:B2RevoluteJointDef = new B2RevoluteJointDef();
motor.enableMotor = true;
motor.collideConnected = false;
motor.maxMotorTorque = torque;
motor.initialize(body.getBody(), anchor.getBody(), anchor.getBody().getPosition());
var joint:B2RevoluteJoint = cast PhysicsWorld.WORLD.createJoint(motor);

This works fine on neko/flash but on Android my body does not rotate : (

Does it work for a desktop build (mac or windows or linux)?
Could be a c++ problem.

Fortunately it’s problem on my side :slight_smile: I’m creating larger bodies on larger screens and because of that they are heavier. I was testing my game on tablet so the difference in size was quite big and I wasn’t applying enough force to move bodies.

I recommend using a “physics scale” multiplier, rather than changing your physics dimensions. This would keep things more consistent and can improve box2d performance

That’s exactly what I’m doing now :slight_smile: