vubidugil Posted February 26, 2017 Report Share Posted February 26, 2017 I'm having problems with the scml animations in construct 2, as soon as the animations are about to leave the screen. a bit before, the animations become invisible. How to prevent this from happening Quote Link to comment Share on other sites More sharing options...
Mike at BrashMonkey Posted February 27, 2017 Report Share Posted February 27, 2017 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. vubidugil 1 Quote Link to comment Share on other sites More sharing options...
lucid Posted February 27, 2017 Report Share Posted February 27, 2017 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: 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. vubidugil 1 Quote Link to comment Share on other sites More sharing options...
vubidugil Posted February 27, 2017 Author Report Share Posted February 27, 2017 Works perfectly,very grateful for the help! lucid 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.