I’ve searched through the forums and read a few related posts. I’ve also scoured the internet and even read a tutorial in Japanese (I think?). However, I can’t seem to quite solve my problem. So, I’m hoping that you Corona experts can help me with this basic question…
I believe the answer lies in the SourceX / SourceY & SourceWidth / SourceHeight parameters used when detailing out complex frames in a sprite sheet. But, no matter how much I search and how many examples I read, I just can’t seem to understand exactly how it works?? (I understand different sized frames and complex frames, I just don’t understand re-positioning them to line up a single spot that is in different locations between different frames).
Let me explain my predicament more clearly and you all can tell me if I’m even in the right ball park.
Let’s say I have an animation of 3 frames. In this animation, a character is facing to the right side and swings a weapon, overhead, from behind to in-front. My goal is to play the animation and line up the frames so that the character is in the same spot on each of the displayed frames in the animation.
Herein lies my problem…my frames all have different widths, ie. when the weapon is behind him the frame is much wider, and the character is towards the right side of the frame (the weapon being behind him, on the left). However, on the last frame the character is on the left side of the frame and the weapon is in front of him. Likewise, in the 2nd frame the weapon is above his head and is taller, but the frame is much thinner than the first and third frames. So, when I play these frames in an animation, he will appear to ‘stutter’ from left to right.
Again, I think I’m the right track with the Source properties, but after reading the API, forums and interwebs, I still don’t fully grasp how they work. Perhaps, someone here can break it down visually, or explain it in a manner different than the API?
Thank you all for reading this, and for those who answer, giving their time.
Kenny