Quantcast
Channel: Question and Answer » libgdx
Viewing all articles
Browse latest Browse all 434

Libgdx shaperender within a circle as limitter

$
0
0

I encountered a problem, where my small entities would be rendered
out of the bounds of my radar.

At the time I solved it like this: ensure, that the object would be within the circle, but, that’s not optimal, because I need variable scale for different entitie sizes, which causes further problems to be solved.

So is there a way, that I can do the following:

draw all items within the circle and ensure that nothing is drawn outside

I thought about something, like a circle canvas, which draws all, but displays only that, which is in the bounds.

Minimap example

The points and lines within the circle are of a variable width / height.
I’d prefer to draw everything, and cut the other stuff off.

Thanks in advance!

€dit: Gosh forgot an important thing: I draw the items with a shaperenderer, and all things are rect’s , and it probably wont be polygons


Viewing all articles
Browse latest Browse all 434

Trending Articles