Box2dCamera or how to render a box2d world!!!

Any community contributions to libgdx go here! Some may get included in the core API when permission is granted.

Box2dCamera or how to render a box2d world!!!

Postby maakasam » Mon Feb 18, 2019 4:18 am

I now saw multiple times that many are overwhelmed on how to use and render a box2d world properly, so I wrote quickly a small helper class.

Box2dCamera is simple class for libgdx to query and draw bodies in a Box2D world. This is meant for beginners with much experience yet. This camera allows the use of large box2d worlds with almost unlimited static or sleeping bodies without worrying about huge render queues. In short: this camera only iterates and draws what it sees.


(I think) it's really straight forward and simple to use and might help some people.
Nox VidMate Mobdro

* add the project to your libgdx project
* Set up one or multiple cameras
* implement the RenderItem interface
that's it.
maakasam
 
Posts: 2
Joined: Mon Feb 18, 2019 4:17 am

Return to Libgdx Contributions

Who is online

Users browsing this forum: No registered users and 1 guest