The Cube 2 models reference is useful (note that we use .js config files, not .cfg, and we use JavaScript syntax in those files. See the example models). Some clarifications to those docs: - MD5 models: Each mesh in the md5mesh file must be 'marked' as follows:
mesh {// meshes: MESHNAME
where MESHNAME is the name of the mesh, that you will use in the config file.
- OBJ models: After the last 'vt' line for a mesh, you should have:
g MESHNAME
Differences with Cube 2/Sauerbraten- You can have up to 128 animations per model. 0-39 are defined by Cube 2, which leaves 40-127 free to be used as custom animations by you.
- To define a custom animation in the model script, use e.g. "50" to define animation 50 (use that where you would have used a Cube 2 animation identifier like "jump", "forward", etc.).
- To run a custom animation on a model, use the integer value, like 50, where you would have used a Cube 2 constant like ANIM_JUMP or ANIM_FORWARD (of course, you can define constants for your own use, so you don't type 50 everywhere).
|