Hey, so, here’s an interesting problem. I’ve got a 2D sprite, in a platforming game (I’m using SpriteManager 2). The main character relies on a rigidbody to handle physics. I have a sprite animation sequence that I want to play whenever I get a certain distance from the ground, or whenever the player approaches the ground. I can change the framerate that the landing animation plays. I haven’t yet figured out a solution that solves all three of these problems:
- The character can land on a platform by jumping up to it, meaning he will not land at the same height he started at.
- The character can land on something by falling down to it from a higher platform, meaning, again, that he doesn’t end up at the same height.
- The character can jump at a range of heights–so putting a cube below him that detects when it hits the ground (and thus triggers the animation) doesn’t really work correctly.
The way I’m currently attacking the problem is via the method mentioned in problem 3. Any idea of a better solution?