Jump to content
Sign in to follow this  
Derek Thompson

Animation issues

Recommended Posts

So, im working on this model, and i am kinda stuck at the animations. I got one door, and one window working, but the last door wont animate. Ingame, the  option to open the door is there, but it isnt opening, wont work in model viewer either. 

 

Model.cfg is HERE

Config.cpp is HERE

 

Selections for door:

 

https://gyazo.com/20fdc8101a3b843be5f1a5ed13f9eeeb

 

https://gyazo.com/63db845291d3970741a7e5fc269501b1

 

https://gyazo.com/f3ef3ae818f87939089d3888c75bd216

 

Thanks in advance ;)

  • Like 1

Share this post


Link to post
Share on other sites

I'm a bit pushed for time right now, so I'm just glancing through. Are you sure that's the model.cfg you posted?

Either there's a mix-up or you've incorrectly set it up. That's where you define the "bones" (selections) in the model. Without those it's just a mesh with some useractions attached.

 

Define your animatable parts in the CfgModels section, like:

 

class HatchDriver
   {
    type="rotation";
    source="hatchDriver";
    selection="poklop_driver";
    axis="osa_poklop_driver";
    animPeriod=0;
    angle0=0;
    angle1="rad -100";
   };

 

For example.

 

Then in the CfgSkeletons section you set out the bone (selection) hierarchy.

 

Without these set up correctly they shouldn't function in Object builder.

 

Someone else might provide a more detailed response. But do some searching, or have a look at some examples in the meantime. :)

Share this post


Link to post
Share on other sites

I'm a bit pushed for time right now, so I'm just glancing through. Are you sure that's the model.cfg you posted?

Either there's a mix-up or you've incorrectly set it up. That's where you define the "bones" (selections) in the model. Without those it's just a mesh with some useractions attached.

 

Define your animatable parts in the CfgModels section, like:

 

class HatchDriver

   {

    type="rotation";

    source="hatchDriver";

    selection="poklop_driver";

    axis="osa_poklop_driver";

    animPeriod=0;

    angle0=0;

    angle1="rad -100";

   };

 

For example.

 

Then in the CfgSkeletons section you set out the bone (selection) hierarchy.

 

Without these set up correctly they shouldn't function in Object builder.

 

Someone else might provide a more detailed response. But do some searching, or have a look at some examples in the meantime. :)

Whoops, posted my config by accident :P was a bit short on time when i wrote this :P Should be updated now. THanks for reply

Share this post


Link to post
Share on other sites

Open House Sample (...\Steam\SteamApps\common\Arma 3 Samples\Addons\Test_House_01\ and check model.cfg and config.cpp.

 

You need to define source of Door animation in model.cfg:

 

// Animation for rotating door #1 (without a door handle)
            class Door_1_rot
            {
                type            = rotation;
                source            = Door_1_source; // Controler defined in class AnimationSources in config.cpp.
                selection        = Door_1; // Selection from p3d that also has to be defined as a bone in this model`s skeleton.
                axis            = Door_1_axis; // Axis of the rotation.
                memory            = 1;
                minValue        = 0; // Value of the controller at which the rotation will be angle0
                maxValue        = 1; // Value of the controller at which the rotation will be angle1
                angle0            = 0;
                angle1            = (rad 110); // "rad" converts from degrees to radians
            };

 

 

config.cpp:

..

class AnimationSources
        {
            // Animation sources for doors
            class Door_1_source
            {
                source = user; // "user" = custom source = not controlled by some engine value
                initPhase = 0; // Initial value of animations based on this source
                animPeriod = 1; // Coefficient for duration of change of this animation
                sound = "GenericDoorsSound"; /// Selects sound class from CfgAnimationSourceSounds that is going to be used for sounds of doors
            };

...

 

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  

×