Following the Ball...

Part of the game will be that the dragon follows the ball. You (the player) don't drive the dragon, you position the ball that he chases.

Just to get started, I came up with a very simple "approach" function that gets the delta between an object (dragon head) and a target (dragon ball). As I move the ball, "approach" gets the delta and applies a fraction of it to the dragon's existing position. This gave me kind of a nice smooth motion.

I was so pleased with that, I decided to try applying it to his body segments as well. As you can see from the attached screenshot, it's not so hot -- the segments spread apart instead of holding more-or-less together like in Space Harrier. 

Still, it's the right idea! And I've got a nice article on how to do spring constraints that might solve the separation problem. At least mostly.

Get Draggin' Dragon

Leave a comment

Log in with to leave a comment.