Jump to content

In construct 2 the animations disappear when they are close to leaving the screen


vubidugil

Recommended Posts

Hi, there's an important trick to avoid this. The Spriter plug-in in C2 uses the custom animation trimming settings from the Spriter file as the "bounding box" to decide when something should be clipped or drawn.

I'm going to bring this post to Edgar (the creator of Spriter and this particular plug-in) so he can give you more concise information.
 


 

Link to comment
Share on other sites

To use bounding boxes precalculated in Spriter for correct clipping and effects, in Spriter, simply click on the box icon on the animation widget. Use settings roughly like what you see below:

bbox1.png

framerate: In order to calculate a bounding box that takes tweening into account, Spriter will go through the animation at a set framerate. 60 is recommended.

padding: Extra pixels added to each side of the bounding box to ensure that frames in between the above calculated don't go slightly outside. 0 is probably fine for most cases, but 1 or 2 pixels isn't going to affect your performance and makes doubly sure.

 

The best workflow would probably be to run the calculation once on all animations the first time you use it, and each time you add an animation. After that, only bother recalculating the bounding box if new animation changes massively affect the bounding box, or if you notice any clipping at runtime. And of course, run it once before shipping or demoing your game.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...