Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

LiquidFun box2d textures?

$
0
0

Can anyone please show me the right way to draw textures in this lib? Like instead of a box, draw a PImage.

I made this through trial and error, which I use to draw an image that's close but not perfect to matching the box2d location. I'd rather not use magic numbers, there has to be a way to convert properly?

  PVector getScreenLoc(Vec2 pos){
    PVector pv = new PVector(pos.x,pos.y);
      pv.x*=0.013;
      pv.x += 450;
      pv.y *= -9.8;
      pv.y += height-236;
      return pv;
  }

Viewing all articles
Browse latest Browse all 2896

Trending Articles