Change the shape of body dynamically

Posted by user45491 on Game Development See other posts from Game Development or by user45491
Published on 2014-05-05T11:13:08Z Indexed on 2014/06/09 15:43 UTC
Read the original article Hit count: 212

Filed under:
|

I have a problem where i have a ballon which i need to continuously inflate and defalte in update method, I have tried to used setScaleCenter but it is not giving desired result. Below is a code i am trying to make work

    scale += (float) ((dist-lastDist)/lastDist);
    Log.d("pinch","scale is "+scale);
    Log.d("pinch","change in scale is "+(float) ((lastDist-dist)/lastDist));
    player.setScaleCenter(scale, scale);
    player.setScale(scale);

© Game Development or respective owner

Related posts about box2d

Related posts about andengine