Forum rules - please read before posting.

Spine and Sprite Sort Point

edited August 2024 in Technical Q&A

Hi, I'm working on a 2D game, and my main character is created using Spine. I was wondering what the correct way is to handle sorting when characters are made with Spine.

Since Spine doesn’t use a Sprite Renderer, I added a child GameObject with a Sprite Renderer that has a tiny transparent sprite placed on the character's shoe. I set the "Sprite Sort Point" to Pivot and added a Sorting Group, with the Order in Layer set to 0.

Here’s an example of my setup:
https://imgur.com/a/6WWEfE2

In a scene, there’s a chair sprite with its "Sprite Sort Point" also set to Pivot (the pivot point is at the bottom of the sprite). However, my character always appears below the chair. What would be the best way to resolve this issue?

Any guidance would be greatly appreciated. Thank you.

Comments

  • If a Sorting Group is attached to the same object as your Follow Sorting Map component, then that will be affected instead of any individual Sprite Renderer.

    I'm not sure what affect the Sorting Group would have on Spine objects, though.

    You can try relying on just Unity for your sorting. Uncheck Affect Character sorting? in the Sorting Map component, and then open up your project's Graphic settings - there you can configure the Transparency Sort Axis. Try setting it to straight up (i.e. 0,1,0).

  • edited August 2024

    Thank you for your quick response! Following your advice, I found a solution to the problem. For anyone new to using Spine with Adventure Creator, adding a Sorting Group at the same level as the Spine Animation component does the trick. You can then use a parent GameObject to adjust the pivot point as needed.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.