PayasoPrince

Good Evening All,

Does Spine have a paper flip effect like this that I can use in Unity?



Thanks! :)
User avatar
PayasoPrince
  • Posts: 38

Harald

Just rotate the GameObject Transform.
User avatar
Harald

Harri
  • Posts: 4459

PayasoPrince

Harald wrote:Just rotate the GameObject Transform.
Oh, if it's that simple then that's fantastic! As my character is 2D in a 3D environment, I've added a billboard script to them so that they always face the camera. I thought that because of this, it might create issues if I rotate the transform. :scared:
User avatar
PayasoPrince
  • Posts: 38

Misaki

You can also achieve the effect by creating two animations in Spine, the one animates the skeleton’s scale X from 1 to 0.001 and another animates the skeleton’s scale X from 0.001 to 1, flip your skeleton in Unity when the first animation is complete, and play the second animation at the end.

Please refer to the following section of the documentation for instructions on how to flip the skeleton:
spine-unity Runtime Documentation: Changing Scale and Flipping a Skeleton

Note: Specifying 0 for the skeleton’s scale in Spine may cause animations to go wrong, so please use a value as close to 0 as possible like 0.01 or 0.001 instead of 0.
User avatar
Misaki

Misaki
  • Posts: 1163

PayasoPrince

Misaki wrote:You can also achieve the effect by creating two animations in Spine, the one animates the skeleton’s scale X from 1 to 0.001 and another animates the skeleton’s scale X from 0.001 to 1, flip your skeleton in Unity when the first animation is complete, and play the second animation at the end.

Please refer to the following section of the documentation for instructions on how to flip the skeleton:
spine-unity Runtime Documentation: Changing Scale and Flipping a Skeleton

Note: Specifying 0 for the skeleton’s scale in Spine may cause animations to go wrong, so please use a value as close to 0 as possible like 0.01 or 0.001 instead of 0.
Thank you very much for always assisting! :)
User avatar
PayasoPrince
  • Posts: 38

Harald

You could also programmatically set skeletonAnimation.Skeleton.ScaleX via code instead of using animations. This comes with the advantage of having precise control over the in-between values. When you want to fake a rotation effect via scale, it's not linear but instead it's scaleX = cos(angle).
User avatar
Harald

Harri
  • Posts: 4459


Return to Unity