Jump to content

Recommended Posts

Like my title suggests I'm making a weapon for the first time and I want the barrel of my minigun to turn in place when firing. Currently it turns but deforms beyond recognition when rotating but returns to normal when the rotation reaches 0 again.
This is the animations class of my model.cfg. I can't see anything wrong with this.

class Animations
        {
			class barrel
            {
                type="rotationZ";
				source="ammoRandom";
				sourceAddress="loop";
				selection="barrel";
				axis="barrel_axis";
				centerFirstVertex=1;
				memory = true;
				minValue=0;
				maxValue=0.5;
				angle0="rad 0";
				angle1="rad 180";
            };

mvrhqhP.gif

Share this post


Link to post
Share on other sites

parenting issue / meshes across multiple named selections. paste the entire model.cfg

  • Like 1

Share this post


Link to post
Share on other sites

This was the first animation class I've added I still need to work on the magazine_reload etc.

Here's my model.cfg so far.

class Rotation;

class CfgSkeletons
{
    class Skeleton
    {
        isDiscrete=0;
        skeletonInherit="";
        skeletonBones[]=
		{
			"ammo_box", "", 
			"barrel", "", 
			"camo1", "", 
			"camo2", "",
			"camo3", ""
		};
    };
};
class CfgModels
{
	class Default;
    class IA_minigun: Default
    {
        htMin=0;
        htMax=0;
        afMax=0;
        mfMax=0;
        mFact=0;
        tBody=0;
        skeletonName="Skeleton";
        sectionsInherit="";
        sections[]={"ammo_box", "barrel", "camo1", "camo2", "camo3"};
        class Animations
        {
			class barrel
            {
                type="rotationZ";
				source="ammoRandom";
				sourceAddress="loop";
				selection="barrel";
				axis="barrel_axis";
				centerFirstVertex=1;
				memory = true;
				minValue=0;
				maxValue=0.5;
				angle0="rad 0";
				angle1="rad 180";
            };
        };
    };
};

 

Share this post


Link to post
Share on other sites

why is there camoX in your model.cfg? does it serve any purpose as a bone?

pretty sure there are shared vertices between camo selections and your other selections

  • Like 1

Share this post


Link to post
Share on other sites

No there isn't a reason to have it there I was under the impression you just had to label all selections as bones but obviously I'm wrong. I'll try removing those later this week.

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

×