caymanbruce Posted April 7, 2017 Share Posted April 7, 2017 I am using Box2D physics engine with PIXI.js as the renderer. But I have trouble using it correctly. Box2D is based in MKS(Meters, Kilograms and seconds) But Pixi.js renders everything in pixel. So I need to convert from MKS to pixel when I render sprites/movements. I don't know how to do this properly. I have seen some examples saying I just need to convert the positions using a scale factor in PIXI.js (see this https://chrisbranch.co.uk/2014/11/debugging-box2d-with-pixi-js/). But someone also recommend me to just use stage.scale so that everything in the stage will scale to the particular ratio I choose at the beginning. Anyone has similar experience before? How to render Box2D-based sprites nicely using PIXI.js? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.