I am in need of animating a butterfly in a way that it works in the BGE. It doesn’t need to be dynamic like the one in YoFrankie, and should be done without key framing, and preferably without py scripting.
Things I tried:
(Before I start, when talking about animating the butterfly, i’m talking about entity movements[as a character], the wings are already animated, that’s a piece of cake mix)
Firstly, I tried to keyframe the butterfly, doesn’t work. It’s motions are very unnatural. To get them to look good, it would require a heap of work.
I thought about having the body follow a curve, works fine in the editor, and for a render, but FollowPath constraints do not work in the game engine.
Then I came upon the ‘scathingly brilliant idear’ of using copy location, and trackto constraints. I created an empty which the butterfly would try to follow, but it didn’t work too well with that copy location constraint so I came upon:
using a trackto constraint to face the empty, and a constant IPO curve causing the butterfly to always move in the local Y direction. I believe this would work, but I can’t for the life of me figure out how to make anything move along any LOCAL axis. not only move, but any transform for that matter. The second problem to this method is that I don’t believe trackTo constraints work inGame. So I searched a bit, and found a Bake Constraint script which would bake an animation with constraints to a straight IPO curve. That would work, I would just have the butterfly loop every 10,000 frames or so.
So what I would like, is if someone could enlighten me on a method on how to get a butterfly to fly nicely in realtime. If I’m making a mistake with any of the first tries, possibly you could point me to a resource that fixes the problem (IE, How to get FollowCurve to work in game.) or you could tell me how to IPO local transformations. I’d appreciate any help I can get very much. Thanks for reading!
The butterfly: (It’s just an ambient object, that’s why the tex res is low. In game you won’t see it quite so close.)