My mesh drops after a while when rigid body turns green. Maybe I sound wierd, but I am new to bullet-physics and 3d stuff, and don't know the actual cause ;P

It happens on using MotionState. Initial state:

enter image description here

After debugdraw turn green

enter image description here

Here is my code inside render method:

        delta = Math.min(1f / 30f, Gdx.graphics.getDeltaTime());

        world.stepSimulation(delta, 5, 1f/60f);
        modelBatch.render(stickobj, environment);

Here is my motion State for stickman:

class StickMotionState extends btMotionState {

    Matrix4 transform;
    float radius;

    StickMotionState(float r){
        radius = r;

    public void getWorldTransform(Matrix4 trans) {
            trans.translate(0, -radius, 0);
    public void setWorldTransform(Matrix4 trans) {

It works fine without explicitly calling, stickobj.body.getMotionState().getWorldTransform(stickobj.transform); as Xoppa stated in this tutorial, but then my model is offset a little bit.

enter image description here

Also, I don't want to offset origin in blender due to increased calulations in placing them in game. PS: What does that green colour signifies :P


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.