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 mickeyhilson » Sat Jun 08, 2019 9:00 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.

* add the project to your libgdx project
* Set up one or multiple cameras
* implement the RenderItem interface
that's it.
Posts: 1
Joined: Sat Jun 08, 2019 8:59 am

Return to Libgdx Contributions

Who is online

Users browsing this forum: No registered users and 1 guest