Rendering my world according to my model
Question
I have two questions:
The first being why exactly my Box2D Body is twice the size of my GameObjects size? I am probably doing something wrong, but it seems odd that the two are aligned perfectly, so the units between my model and my renderer match up.
Second question I have, is if I can somehow change the projection the SpriteBatch uses to place objects on the screen, instead of moving my camera?
The picture here explain my two problems quite well
Solution
- I think you used setAsBox() method on your PolygonShape. this method only takes the half-width and half-height of the box. So if you give it the full size, it will be twice as large and twice as high.
spritebatch.setProjectionMatrix()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow