Is this even possible in Corona? If I already have a fully put together sprite sheet and I want to define the shape of each individual frame of the sprite, how would I go about doing this? My character has a walking animation to the right and left, and obviously as he moves his legs to walk his shape changes, so I want to figure out the best way to reflect that.
Create a ragdoll maybe?
This is somewhat tricky, but it’s possible. You’d have to essentially create a complex physics body which contains all of the possible shapes of the body (where the limbs would be in all basic states of the animation). Then, you could use pre-collision and PhysicsContact during a collision to detect which part(s) of the body are “on” (depending on the frame) and, if true, honor the collision (else, ignore it). It’s a fair amount of initial setup, but once you got it going, it should work fine.
Best regards,
Brent
Back in the olden days when I made my living on the stage, I worked on a club juggling trick where I actually caught the clubs with my hands upside down, so had to flip them “backwards” to throw them again (hard to describe in text). It is *hard* to do but I worked on it for hours and hours to get it down.
But I quickly dropped it from the act in disgust when I realized the audience had no clue what I was doing, let alone how hard it was. However, they cheered mightily when I ate an apple while juggling (a trick so technically easy that even baby jugglers do it).
The moral of the story is – whether you’re juggling or whether you’re making a game – don’t spend time on something that the audience is never going to notice, much less appreciate. Unless you’re doing some kind of “Ministry of Silly Walks,” different physics bodies for frames of walking animation *probably* fits into that category.
Jay
Create a ragdoll maybe?
This is somewhat tricky, but it’s possible. You’d have to essentially create a complex physics body which contains all of the possible shapes of the body (where the limbs would be in all basic states of the animation). Then, you could use pre-collision and PhysicsContact during a collision to detect which part(s) of the body are “on” (depending on the frame) and, if true, honor the collision (else, ignore it). It’s a fair amount of initial setup, but once you got it going, it should work fine.
Best regards,
Brent
Back in the olden days when I made my living on the stage, I worked on a club juggling trick where I actually caught the clubs with my hands upside down, so had to flip them “backwards” to throw them again (hard to describe in text). It is *hard* to do but I worked on it for hours and hours to get it down.
But I quickly dropped it from the act in disgust when I realized the audience had no clue what I was doing, let alone how hard it was. However, they cheered mightily when I ate an apple while juggling (a trick so technically easy that even baby jugglers do it).
The moral of the story is – whether you’re juggling or whether you’re making a game – don’t spend time on something that the audience is never going to notice, much less appreciate. Unless you’re doing some kind of “Ministry of Silly Walks,” different physics bodies for frames of walking animation *probably* fits into that category.
Jay