User Tools

Site Tools


arma:howto_animate_model

This is an old revision of the document!


How to Animate a Model

SLX for their animation tutorials and examples.

Animations / translations

after my own tests on the animations, i have discovered the following things: for the bones, it is possible to link several bones almost like in the article.

skeletonBones[]=
{
	"bone1","" 
	"bone2","bone1",
	"bone3","bone2"      
};

here, we have bone3 connected to bone2, which is connected to bone1. if bone1 move, bone2 and bone3 will move with him. if bone2 move, only bone3 will move with it, bone1 will remain unchanged, etc… i haven't tested the maximum limit of bones you can link like that, but 3 bones linked like that works perfectly.

the translations. for the translations, you need offset0 and offset1 in place of angle0 and angle1.

one thing important to know about translation axis(done several tests about it)

the distance between the two points of your axis will become the “unit” of the offset. in the following example, i have an offset1=“5”, which means the bone will translate by 5 units. if the distance between the two points of my axis is 1 meter (assuming meters are the base unit in oxygen), the bone will move by 5 meters. if the distance between my two points is different, the bone movement will scale accordingly - if distance between the two points of the axis is 0.5m, the bone will only translate by 2.5 meters.

this particular point might be useful if you have to scale up or scale down your whole model, if it is already animated, because the offset value may not need to change.

class translatedobject
{
	type="translation";
	source="animtranslate";
	selection="translatedbone";
	axis="translateaxis";
	memory=1;
	sourceAddress="clamp";
	minValue="0";
	maxValue="1";
	offset0="0";
	offset1="5";
};

another important point to know, is that the types TranslationX, TranslationY, and TranslationZ, if used without axis, do not have a meter based unit. so it may be better to use your own axis for doing accurate translations. Also, without an axis, the translation will correctly translate along the X, Z or Y axis, but the game engine seems to act weird for the direction to follow along this axis (several times, the object moved only in one direction, whatever the offset1 value was negative or not.)

arma/howto_animate_model.1183550047.txt.gz · Last modified: 2007/07/10 09:52 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

All PMC web site download services are temporarily suspended until web site yearly fees have been recovered, want to download addons/mods? Then Support PMC.

If you are grateful for all the work PMC has done in the past 25 years, use Support PMC page.