Home   Help Search Login Register  

Author Topic: Moving 'user' animation to 'direct' animation.  (Read 2922 times)

0 Members and 1 Guest are viewing this topic.

Offline i0n0s

  • Former Staff
  • ****
Moving 'user' animation to 'direct' animation.
« on: 12 May 2009, 02:49:35 »
I have some animation which source type 'user' and want to change them to 'direct'. When I simple replace user with direct, the result seems to be a combined animation of the two types:

Code: (config.cpp) [Select]
class AnimationSources {
class Contract0 {
source = "user";
animPeriod = 0.001;
initPhase = 0;
};
class Lift0: Contract0 {};
};
Code: (model.cfg) [Select]
class Animations {
class Contract0 {
type = "translationX";
animPeriod = 0.001;
source = "user";
selection = "Segment01";
axis ="center_start";
minValue = 0.0;
maxValue = 1000;
offset0 = 0;
offset1 = 1000;
};
class Lift0: Contract0 {
type = "translationy";
minValue = -100;
maxValue = 100;
offset0 = -100;
offset1 = 100;
};
};

It works fine with the 'user' source, but the animPeriod is noticeable and should get removed via 'direct'.
Anyone knows how to do this or what is missing?

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Moving 'user' animation to 'direct' animation.
« Reply #1 on: 12 May 2009, 15:51:58 »

 well you probably picked the hardes anim to find any info :).
 i only know of the Nodding donkey or oil pump that uses it and in the first releases including the mlods , it wasnt working propperly, BIS fixed it in a Hotfix but unfortunately didnt release any info on why and how the fix was implemented.

i think these where the guts of the anims but again i think i discovered it was the p3d that was forked so couldnt get a fix .

model.cfg

Code: [Select]
class Animations
    {
    class Animations
    {
      class dbo_ropa_anim1_0
      {
      type="direct";
        source="dbo_ropa_anim";
      selection="tyce";
        axis = "osa_tyce2";
      minValue=0.0;
      maxValue=0.15;
      axisDir[]={1,0,0};
      axisPos[]={0,0,0};
      axisOffset=0.0;
      angle=8;
      };

  and cpp

Code: [Select]
class AnimationSources
{
class dbo_ropa_anim
{
source = "time";
sourceAddress = loop;
};
};;

 its been so long i could not tell you if i got it to work though, it was frustrating as i was using it in an island like bis so 5 x the  messing about.

 
I love ofp

Offline T_D

  • CWR
  • **
  • Troubleshooting Device
Re: Moving 'user' animation to 'direct' animation.
« Reply #2 on: 17 May 2009, 17:22:22 »
why not using animPeriod = 0 ?

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Moving 'user' animation to 'direct' animation.
« Reply #3 on: 17 May 2009, 19:11:50 »
 
 "why not using animPeriod = 0 ?"

Animperiod  = 0 will give a default of 1 second simulation step with user anims.

 if he simply want to speed it up then .01 is fastest noticeable for user anims i didnt see any difference between .01 and .001 maybe .01 is framerate i dont know.

  i thought he wanted to have it auto animate when placed in game ,thats what direct is for using a pre defined source such as time , from which you can"time / ,* -"  etc in the model.cfg if you wish to change  .
I love ofp

Offline i0n0s

  • Former Staff
  • ****
Re: Moving 'user' animation to 'direct' animation.
« Reply #4 on: 03 Jun 2009, 02:41:55 »
I don't know how I can use time to control my model :|