Jump to content
Sign in to follow this  
SoldierIsNotHistory

Custom CfgModels Animations on Characters models

Recommended Posts

Hey there,

I try to define a class Animations with user animations in a character model.

And the only part I can move are weapon, launcher and NVG.

No way to move a custom selection.

Someone has already suceed in moving custom selection part in a model which is a characters?

My cpp:

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

{

class Default;

class Head

{

isDiscrete = 0;

skeletonInherit = "";

skeletonBones[] =

{

"neck","",

"neck1","neck",

"head","neck1",

"lBrow","head",

"mBrow","head",

"rBrow","head",

"lMouth","head",

"mMouth","head",

"rMouth","head",

"eyelids","head",

"LLip","head"

};

};

class Flag: Default {};

class FlagCarrier: Default

{

skeletonInherit = "Default";

skeletonBones[] =

{

"stozar","",

"vlajka",""

};

};

class OFP2_ManSkeleton

{

isDiscrete = 0;

skeletonInherit = "Head";

skeletonBones[] =

{

"weapon","",

"launcher","",

"Camera","",

"Spine","",

"Spine1","",

"Spine2","",

"Spine3","",

"Pelvis","",

"LeftShoulder","",

"LeftArm","",

"LeftArmRoll","",

"LeftForeArm","",

"LeftForeArmRoll","",

"LeftHand","",

"LeftHandRing","",

"LeftHandRing1","",

"LeftHandRing2","",

"LeftHandRing3","",

"LeftHandPinky1","",

"LeftHandPinky2","",

"LeftHandPinky3","",

"LeftHandMiddle1","",

"LeftHandMiddle2","",

"LeftHandMiddle3","",

"LeftHandIndex1","",

"LeftHandIndex2","",

"LeftHandIndex3","",

"LeftHandThumb1","",

"LeftHandThumb2","",

"LeftHandThumb3","",

"RightShoulder","",

"RightArm","",

"RightArmRoll","",

"RightForeArm","",

"RightForeArmRoll","",

"RightHand","",

"RightHandRing","",

"RightHandRing1","",

"RightHandRing2","",

"RightHandRing3","",

"RightHandPinky1","",

"RightHandPinky2","",

"RightHandPinky3","",

"RightHandMiddle1","",

"RightHandMiddle2","",

"RightHandMiddle3","",

"RightHandIndex1","",

"RightHandIndex2","",

"RightHandIndex3","",

"RightHandThumb1","",

"RightHandThumb2","",

"RightHandThumb3","",

"LeftUpLeg","",

"LeftUpLegRoll","",

"LeftLeg","",

"LeftLegRoll","",

"LeftFoot","",

"LeftToeBase","",

"RightUpLeg","",

"RightUpLegRoll","",

"RightLeg","",

"RightLegRoll","",

"RightFoot","",

"RightToeBase","",

"myselection","",

};

};

};

class CfgModels

{

class Default

{

skeletonName = "";

sectionsInherit="";

sections[] = {};

};

class flag_vojak : Default

{

sections[] =

{

"latka"

};

};

class Head: Default

{

skeletonName = "Head";

sectionsInherit="";

sections[] =

{

"osobnost","brejle"

};

};

class Soldier_MDL: Default

{

skeletonName = "OFP2_ManSkeleton";

sections[] =

{

"osobnost","Head_Injury","Body_Injury",

"l_leg_injury","l_arm_injury",

"r_arm_injury","r_leg_injury",

"clan"

};

class Animations

{

class myanimation

{

type="rotation";

source="mysource";

selection="myselection";

axis="myaxis";

memory="true";

angle0="0";

angle1="rad 60";

};

};

};

};

class CfgVehicles

{

class Soldier_MDL

{

(...)

class AnimationSources

{

class mysource

{

source = "user";

animPeriod = 1;

initPhase=1;

};

};

(...)

};

};

With selection="myselection"; nothing is moving

With selection="weapon"; weapon is moving

With selection="Head"; nothing is moving

So the question is, how to animate a characters model with own selection?

Thx for reading smile_o.gif

Edited by W0lle

Share this post


Link to post
Share on other sites

I tried your example and the animation worked in o2. Are you saying that it doesn't work ingame only? BTW you should really use a model.cfg instead of doing all that stuff in the config.cpp file. A few ideas:

1. Is the animated object attached to a certain part of the model? if it isn't, it would appear below ground.

2. Try making it a sub-bone of the bodypart its attached to ie.

"head","",

"myanimation", "head",

3. check for case sensitivity (I sometimes get this error)

maybe post up a picture or something to give us a better idea of what the problem is smile_o.gif

Edited by W0lle

Share this post


Link to post
Share on other sites

I've got a similar problem - no matter what I try, I can't make my soldier unit have linear animations. Rotation, translation, doesn't matter; it won't work. I've tried a multitude of skeleton setups and different cfgmodels setups, but the animate command does nothing.

Current model.cfg in use:

code removed due to problem already encountered, see below

At this point, I'm not even sure if it's possible to have linear animations on a soldier unit?

EDIT:

It would appear there's a limitation as to whether or not we can define custom animation sources for soldier units - or we need to use a special source name of some form...

EDIT2:

Ok, according to this thread, we cannot combine rtm animations and cfg animations. If you're working with soldier units, they must be animated purely with rtm. Bummer! banghead.gif

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  

×