• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How can you include the pivot/anchor point when exporting to a JSON spritesheet?

New Here ,
Feb 08, 2022 Feb 08, 2022

Copy link to clipboard

Copied

For example, PixiJS supports an "anchor" value that works effectively the same as Animate's pivot. But when generating a spritesheet from a movie clip, the pivot point seems to be ignored.

 

Thanks!

TOPICS
Import and export , Missing feature

Views

290

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 08, 2022 Feb 08, 2022

Copy link to clipboard

Copied

LATEST

As it looks like Animate doesn't support the anchor point, I've come up with a wasteful but functional way to align the sprites to a central anchor;

In the movie clip in Animate, put a centered transparent (opacity 0% fill) square in the background that's larger than your frame contents (see attached screenshot; in this case it's size 128,128 and so at position -64,64). This forces the spritesheet to use this as the frame dimensions.

Then after importing the resulting sprite, set the anchor to 0.5,0.5. Now the anchor is in the middle of your movie clip.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines