Problem statement
Describe: 1) what you have tried, 2) what you expected, and 3) what actually happened.
Give step-by-step instructions so we can reproduce the problem, if possible.
Runtime information
Tell us your Spine Runtimes version.
Runtime 4.2
Hi! I've been using the Spine2D generic cpp runtime with raylib, a c++ game development framework.
I can get things to render fine, but there is a problem with the scale option.
What I Tried
I tried rendering the default spine boy project included with Spine.
Here is the setup code I used: (I left out the raylib-specific render code)
atlas = std::make_unique<spine::Atlas>(util::getAssetPath("spine/spineboy-pro.atlas").c_str(), &textureLoaderSpine);
skeletonJson = std::make_unique<spine::SkeletonJson>(atlas.get());
skeletonJson->setScale(1);
skeletonData = std::unique_ptr<spine::SkeletonData>(skeletonJson->readSkeletonDataFile(util::getAssetPath("spine/spineboy-pro.json").c_str()));
// Create the spAnimationStateData
animationStateData = std::unique_ptr<spine::AnimationStateData>(new spine::AnimationStateData(skeletonData.get()));
// Set the default mix time between any pair of animations in seconds.
animationStateData->setDefaultMix(0.1f);
skeleton = std::unique_ptr<spine::Skeleton>(new spine::Skeleton(skeletonData.get()));
skeleton->setX(400);
skeleton->setY(400);
skeleton->setScaleX(0.5);
skeleton->setScaleY(0.5);
What I Expected
I expected the sprite to render exactly as it should, facing the right side and displaying a walking animation.
What I Got
When I set the scaleX to positive and the scaleY to positive, nothing renders at all.
skeleton->setScaleX(0.5);
skeleton->setScaleY(0.5);
But when I set either the scaleX or scaleY to negative, the animation renders just fine (I'm using the example animation from the spine boy project included with Spine).
skeleton->setScaleX(-0.5);
skeleton->setScaleY(0.5);
GIF example (x flipped, renders properly)