0
votes

I am making 2D game, where I can move bones of hero. I don't want to use spritesheets. Hero's legs and arms are made by polygons, because I want to easily change it's colour.

But I have problem with "dynamic parts of body" i mean knee, ankle and others joints - I must remake polygons for this parts every frame, because for example I change knee angle - so I must create new polygon for knee joint.

This makes game laggy on mobile devices :/

Maybe I'm doing it wrong. How to make dynamic polygons in LIBGDX?

1

1 Answers

0
votes

If you want to rotate a part of your character you can use the Polygon class http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/math/Polygon.html

And use the rotate function.

Spritesheets are not that bad anyways, I would rather use them.