Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible issue with rotation during animation. #22

Open
MrSiggler opened this issue Nov 7, 2016 · 2 comments
Open

Possible issue with rotation during animation. #22

MrSiggler opened this issue Nov 7, 2016 · 2 comments

Comments

@MrSiggler
Copy link

MrSiggler commented Nov 7, 2016

Hey, I've recently added support for Spriter to my game via this sprite engine, but I had a peculiar issue when it was all set up.. everything was placed properly, but things were spinning crazy like on their pivot points.

What fixed it for me, was to dig into angleinfo.cpp and have the spinDirection swap between 1/!1 if reverseAngleOnLoad was used when loading (as I set that to false for my game.) I assume that the direction of the animation's interpolation isn't taken into account when it's reversed at load, and things are 'snapping' the wrong way?

@MrSiggler
Copy link
Author

I further simplified this by removing my changes to angleInfo, and adding..

if (!Settings::reverseAngleOnLoad) spin *= -1;

To line 1166 of spriterdocumentloader.cpp

@vamidi
Copy link

vamidi commented Sep 3, 2019

@MrSiggler I have the same issue because I have everything set to false. setting spin to *= -1 does not seems to work for me. Are you using opengl to render? what does your matrix looks like sending to the gpu. I think I do something wrong. I do have the sprites on the right position but I think the rotation matrix is doing something weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants