Not logged inOpenClonk Forum
Up Topic Clonk model

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Clonk-Karl
I have implemented this. The final functions look like this:

int AttachMesh(id mesh, string parentbone, string childbone, [opt] int scale);
bool DetachMesh(int attachnumber);


AttachMesh returns nil if some error occurred, or a positive integer otherwise which can be supplied to DetachMesh to remove the mesh again. Meshes also can be attached recursively, and attached meshes can play animations, but there is no C4Script interface for that functionality yet. scale can be used to scale the attached mesh by a constant factor (in case the child mesh was modelled at a different scale than the parent mesh was). 1000 means no scale, 500 makes it half as big, 2000 doubles its size.

It might also make sense to allow arbitrary transformations, for example to attach a bone to another one with a fixed offset and/or rotation.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill