简体   繁体   中英

PolygonSprite in LibGdx shows only part of the Texture.

i have got this beautiful looking image:

在此处输入图片说明

I decided to use the PolygonSprite class in LiGgdx to display a part of that Image.

It ended up looking like that: 在此处输入图片说明

As you can see the very left corner of my image is visible.

Here comes my question: What can i do to display a larger part of that image inside the polygonSprite above, without changing the polygonSprite's size ?

I do really appreciate any answer and please don't hesitate to ask if something isn't clear.

我从未亲自使用过它,但是在文档中看起来像这样:您必须使用正确的多边形区域(带有纹理像素坐标的顶点)创建多边形精灵,然后使用setSize将其“缩放”为您所需要的大小想要显示它(世界/视口坐标)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM