Jump to content
Sign in to follow this  
uterian

Parsing scml file for sprite coordinates

Recommended Posts

Hi guys,

I need to have each part's positions every 50ms in an animation so I can use them on sfml however I wish.

I don't want to spend alot of time to learn the whole spriter framework for c++. I just need to get part positions.(not bones)

is there any parser for that , or any information/little trick I can use so I can write a parser for the .scml file?

 

Is there any way to export that .scml file without bone informations but only sprite positions (x,y,rotation)(and idealy with custom determined intervals like 50ms)

 

best regards

-ozan

EDIT: through searching old posts on forum, I've found this link http://www.brashmonkey.com/ScmlDocs/ScmlReference.html

BUT Most probably it's outdated. Calculating real X and Y values are not as shown in this reference page.

Right formulas (checked) : 

float realX = (y*s) + (x*c);
float realY = (y*c) - (x*s);

also you gotta multiply  ParentY and ChildY with -1 beforehand. Don't know the reason but they are written into the file with opposite signs.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×