CarlosCa

Hi,
I have a problem with spines, every time I move a spine animation, if the origin of the spine moves out of the screen(right margin), the whole animation disappears. It's quite strange since it only happens with the right and top margins. Any ideas?
Thanks in advance!

---

Is like the spine looses its skin, because with debugBones = YES, the bones are there all the time.

---

still stuck with this...
CarlosCa
  • Posts: 3

Nate

What runtime are you using? It sounds like it could be a problem with culling -- the renderer thinks the skeleton is off screen so doesn't draw it.
User avatar
Nate

Nate
  • Posts: 12213

CarlosCa

I am using Cocos2d runtime. I managed to solve it, it seems that moving a SkeletonAnimation by changing its position is the problem. When moving the SkeletonAnimation changing its rootBone behaves correctly but I have to "correct" the position by a certain amount to move the SkeletonAnimation by its center.
CarlosCa
  • Posts: 3

jamqdlaty

Nate wrote:What runtime are you using? It sounds like it could be a problem with culling -- the renderer thinks the skeleton is off screen so doesn't draw it.
Is this something completely on the side of cocos2d, or could it be fixed on your end? Dev of the project I'm working on reports the same problem and apparently for some reason the Spine object has to be a part of a gameobject (it's linked to non-spine asset), so moving the root bone is not a good workaround.
jamqdlaty
  • Posts: 32

Nate

This thread is from 7 years ago, the runtimes have changed a lot. Are you using spine-cocos2dx or spine-cocos2d-objc? If spine-cocos2dx and using CC_USE_CULLING then the culling happens here:
https://github.com/EsotericSoftware/spine-runtimes/blob/4.1/spine-cocos2dx/spine-cocos2dx/src/spine/SkeletonRenderer.cpp#L247
For that, it shouldn't matter if you move the gameobject or skeleton or root bone. If you think it's not right, try visualizing getBoundingBox().
User avatar
Nate

Nate
  • Posts: 12213


Return to Runtimes