Animation Issues

I have a .egg animation file given to me by a friend who is modelling for me that dosen’t seem to work.

This is how i loaded in the model and animation

NodePath player = window->load_model(framework->get_models(), dir + "model/test_model");
player.set_pos(0, 0, 10);	

window->load_model(player, dir + "model/test_walking");
auto_bind(Chugg.node(), player_anims, PartGroup::HMF_ok_part_extra | PartGroup::HMF_ok_anim_extra | PartGroup::HMF_ok_wrong_root_name);

From the output in command prompt, it shows that the model was loaded and no error was shown. But when i ran the game, the model simply stood still and didn’t move.

I looked into the model file and found chunks of values like this

I’m rather new to programming and from what i’ve gathered from the net, -1.23815e-005 seems to represent a very small negative number? But i don’t see it in the pilot model’s (Downloaded from this site) animation file which loaded and animated fine.

hehe i also haven’t found the answer to my previous post :open_mouth:

-1.23815e-005 is basically zero. You’re not likely to find precisely that particular value in the source file, since there are all sorts of minor variants on zero, all of which are equally valid.

But the egg code that you’re pasting from is from an animation file, not a model file. Are you sure you’re looking at the right egg files? You’ll find and entries in your model file.

The acid test: can you pview your egg file, with “pview -a model.egg animation.egg” and observe the animation? If it doesn’t animate, then something’s wrong with your model. If it does animate, then something’s wrong with your code.


my friend has just informed me that he is exporting from 3dsmax using bones and something called IK. not too sure on what IK is myself but i’d like to ask is it supported by panda? Or better, what kind of animation can he do? i.e. bone, bipad ~

Panda uses bone-based animation, for the most part. The panda exporter’s job is to record the positions of the bones and put those positions into the egg file. The exporter doesn’t care how the bones got to where they are - IK or not - it only records their positions.

I believe that when using Max, there are a thousand ways to “connect” the mesh to the bones. The only way that works is to use either the Skin or the Physique modifier. Any other method of connecting mesh to bones will not be handled correctly.