Skip to main content
Participant
February 8, 2022
Question

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

  • February 8, 2022
  • 1 reply
  • 450 views

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!

This topic has been closed for replies.

1 reply

Participant
February 8, 2022

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.