Jump to content
Sign in to follow this  
[aps]gnat

Animation - using Translation not rotation

Recommended Posts

For Animation, how do you get TRANSLATION to work (i.e. linear motion)

I can get my section to move in a straight line, but it aways seems to only move just 1 meter.

How does these work to define how far a selection moves ?

Quote[/b] ] minValue

maxValue

angle0

angle1

offset0

offset1

Share this post


Link to post
Share on other sites

offset0/1 defines it. There're two points in memory that define axis. offset0=0;offset1=1 means selection will be moved all the way between those points. i.e it's relative value not meters.

Share this post


Link to post
Share on other sites

OK, thanks Gargantua.

But I need a little more info. What are the points in memory and I guess you also need to link those named points to the config?

..... either that or point me to anyones model that uses Translation (with MLOD and config) and I'll figuire it out.

Share this post


Link to post
Share on other sites
Quote[/b] ]For Animation, how do you get TRANSLATION to work (i.e. linear motion)

I can get my section to move in a straight line, but it aways seems to only move just 1 meter.

It's been a while since I messed around with animations, but I observed the same problems you did. The distance a linear translation moves is directly related to the animation source. Hence the distance of 1m. I tried all these values you listed without seeing any apparent change.

Quote[/b] ]either that or point me to anyones model that uses Translation (with MLOD and config) and I'll figuire it out.

The only examples I've seen are in the model.cfg's released by BI. They only cover dampers, so there is never any need to go beyond the 1m limit.

Like I said it's been a while and I can't remember if I tried using my own animation source this way. If you can define your own min and max values for user defined animation sources i.e 0 to 1000 instead of 0 to 1, then it should work ok?

An alternative, all be it, far from ideal. Would be to have nested, linear translations using bone inheritance. The theory is, three connected bones, each with it's own 1m translation. Would then extend to three meters max, based on a single 0 to 1 animationphase. If that makes sense?

Anyway let us know how you get on.

Share this post


Link to post
Share on other sites
Quote[/b] ]But I need a little more info. What are the points in memory and I guess you also need to link those named points to the config?

you can define points or just an axis (consisting of two points). you can definatelly use bis examples it's the same for any translation. just define an axis wink_o.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class beam

{

type="translation"; // The type of animation.

source="reloadMagazine"; // The controller that provides input.

selection="beam"; // The name of the skeleton bone used.

// axis=""; // The name of the axis in the model.

begin="konec hlavne";

end="usti hlavne";

minValue=0.0; //The minimum value of the motion range. i.e. The controller input when animation phase is 0.

maxValue=0.01; //The maximum value of the motion range. i.e. The controller input when animation phase is 1.

offset0=5000;

offset1=5000;

};

moves selection forward very far (tried to make better LD ages ago)

Share this post


Link to post
Share on other sites

Thanks Gargantua, that help me experiment some more.

This example below worked.

In the Memory LOD there was an "offsetx0" point which sits near the start location

And the "offsetx1" point which sits near your animation ending location.

The axis of movement is between the 2 points.

The named section "lift1" (in Res, GEO, View LODs etc) is what moves.

Inside class cfgModels

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class Animations

{

class elevX

{

type="translation";

source="MoveX1";

selection="lift1";

begin="offsetx0";

end="offsetx1";

minValue=0.0;

maxValue=1.0;

offset0=0;

offset1=1;

};

};

30 sec slow animation (inside class CfgVehicles)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class AnimationSources: AnimationSources

{

class MoveX1

{

source = "user";

animPeriod = 30;

initPhase=0;

};

};

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×