Magnesus

Since the last update when I flip something it disapears.
I do flipping like that:

currenti.skeleton.setFlipX(true); // flip

I'm using libGDX runtime.

PS. Apparently the object ends up out of screen and I have to do:
if(skeleton.getFlipX())
root.setX(-getX());
to fix it... Is it intentional?
Magnesus

Kickstarter Backer
  • Сообщения: 111

Pharan

were you positioning the skeleton by modifying the position of root bone?
It's not ideal to reposition the root bone for logic stuff.

I'm not familiar with Spine-libgdx. But I think the Skeleton object has two floats (x and y), used to position it. Not sure though.
Аватара пользователя
Pharan
  • Сообщения: 5366

Nate

Yep. The root bone shouldn't be used for positioning. This was changed months ago. The reason is that using the root bone for positioning is wasteful. We can avoid an extra bone transform by allowing the skeleton to have X/Y fields to position the skeleton, then the root bone can be used as part of the actual skeleton. Use 0,0 in the editor as a reference point for positioning your skeleton at runtime.
Аватара пользователя
Nate

Nate
  • Сообщения: 9288

Magnesus

Thanks for the replies. skeleton.setX/setY it is then. :)
Magnesus

Kickstarter Backer
  • Сообщения: 111


Вернуться в Bugs