Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
[xdf]kanga

Problem with custom hand animations and custom units

Recommended Posts

We have created some new unit models for the AAW mod and have weighted them correctly so that they will perform all the normal ArmA2 body animations correctly.

The units also seem to hold the standard weapons such as M4s, pistols, MGs etc correctly.

However, we've run into a problem with custom weapon hand animations and the new default hand animations for M4s with grenade launchers, the front hand grip on the MK48 etc. For the M4 with GL, for instance, the left hand passes through the GL, just like it used to do in ArmA1.

What doesn't make sense is that the right hand position changes when we use a custom animation - which is consistent with the new animation having worked but the left hand remains in the default hand position.

We've made sure we are using the new ArmA2 skeleton when binarising these models and the selections in the lods match those in the example soldier model, as does the memory lod. We've also copied the hands from the example model so the definition and weighting of the hands should be identical.

Has anybody else had this problem or can anyone make a suggestion that may help us resolve this problem?

Share this post


Link to post
Share on other sites

do you have the arma2 model.cfg running with these units? that's all i can really think of at the moment, i had a problem similar to this in arma1 and i fixed it with the model.cfg

Share this post


Link to post
Share on other sites

The skeleton the units use, must be named "OFP2_ManSkeleton" other wise the hand animations wont work correctly. Even if you create a new Skeleton with a new classname that inherits from the "OFP2_ManSkeleton" skeleton, the new hand animations are defined in such a way to only work with the named "OFP2_ManSkeleton".

class cfgSkeletons
{
class default;
[color="red"]class OFP2_ManSkeleton[/color]
{
	isDiscrete = 0;
	skeletonInherit = "";
	skeletonBones[] =
	{
		"Pelvis","",
		"Spine","Pelvis",
		"Spine1","Spine",
		"Spine2","Spine1",
		"Spine3","Spine2",
		"Camera","Pelvis",
		"weapon","Spine1",
		"launcher","Spine1",	
	//Head skeleton in hierarchy
		"neck","Spine3",
		"neck1","neck",
		"head","neck1",
		"HeadCutScene","head",
		"jaw","head",
		"chin","head",
		"jaw_rf","head",
		"jaw_rm","head",
		"jaw_rs","head",
		"jaw_lf","head",
		"jaw_lm","head",
		"jaw_ls","head",
		"ear_r","head",
		"ear_l","head",
		"lip_lc","head",
		"lip_lwlb","head",
		"lip_lwlf","head",
		"lip_lwm","head",
		"lip_lwrf","head",
		"lip_lwrb","head",
		"lip_rc","head",
		"lip_uprb","head",
		"lip_uprf","head",
		"lip_upm","head",
		"lip_uplf","head",
		"lip_uplb","head",
		"nose_tip","head",
		"nose_r","head",
		"nose_l","head",
		"zig_lt","head",
		"zig_lm","head",
		"zig_lb","head",
		"zig_rt","head",
		"zig_rm","head",
		"zig_rb","head",
		"cheek_r","head",
		"cheek_l","head",
		"eyebrow_lb","head",
		"eyebrow_lm","head",
		"eyebrow_lf","head",
		"corr","head",
		"eyebrow_rf","head",
		"eyebrow_rm","head",
		"eyebrow_rb","head",
		"eye_upr","head",
		"eye_lwr","head",
		"eye_upl","head",
		"eye_lwl","head",
		"cheek_rf","head",
		"cheek_rm","head",
		"cheek_rb","head",
		"cheek_lf","head",
		"cheek_lm","head",
		"cheek_lb","head",
		"forehead_l","head",
		"forehead_m","head",
		"forehead_r","head",
		"l_eye","head",
		"r_eye","head",
		"l_pupila","head",
		"r_pupila","head",
		"neck_t","head",
		"neck_b","head",
		"neck_r","head",
		"neck_l","head",
		"tongue_b","head",
		"tongue_m","head",
		"tongue_f","head",
	//Left upper side
		"LeftShoulder","Spine3",
		"LeftArm","LeftShoulder",
		"LeftArmRoll","LeftArm",
		"LeftForeArm","LeftArmRoll",
		"LeftForeArmRoll","LeftForeArm",
		"LeftHand","LeftForeArmRoll",
		"LeftHandRing","LeftHand",
		"LeftHandRing1","LeftHandRing",
		"LeftHandRing2","LeftHandRing1",
		"LeftHandRing3","LeftHandRing2",
		"LeftHandPinky1","LeftHandRing",
		"LeftHandPinky2","LeftHandPinky1",
		"LeftHandPinky3","LeftHandPinky2",
		"LeftHandMiddle1","LeftHand",
		"LeftHandMiddle2","LeftHandMiddle1",
		"LeftHandMiddle3","LeftHandMiddle2",
		"LeftHandIndex1","LeftHand",
		"LeftHandIndex2","LeftHandIndex1",
		"LeftHandIndex3","LeftHandIndex2",
		"LeftHandThumb1","LeftHand",
		"LeftHandThumb2","LeftHandThumb1",
		"LeftHandThumb3","LeftHandThumb2",
	//Right upper side
		"RightShoulder","Spine3",
		"RightArm","RightShoulder",
		"RightArmRoll","RightArm",
		"RightForeArm","RightArmRoll",
		"RightForeArmRoll","RightForeArm",
		"RightHand","RightForeArmRoll",
		"RightHandRing","RightHand",
		"RightHandRing1","RightHandRing",
		"RightHandRing2","RightHandRing1",
		"RightHandRing3","RightHandRing2",
		"RightHandPinky1","RightHandRing",
		"RightHandPinky2","RightHandPinky1",
		"RightHandPinky3","RightHandPinky2",
		"RightHandMiddle1","RightHand",
		"RightHandMiddle2","RightHandMiddle1",
		"RightHandMiddle3","RightHandMiddle2",
		"RightHandIndex1","RightHand",
		"RightHandIndex2","RightHandIndex1",
		"RightHandIndex3","RightHandIndex2",
		"RightHandThumb1","RightHand",
		"RightHandThumb2","RightHandThumb1",
		"RightHandThumb3","RightHandThumb2",
	//Left lower side
		"LeftUpLeg","Pelvis",
		"LeftUpLegRoll","LeftUpLeg",
		"LeftLeg","LeftUpLegRoll",
		"LeftLegRoll","LeftLeg",
		"LeftFoot","LeftLegRoll",
		"LeftToeBase","LeftFoot",
	//Right lower side
		"RightUpLeg","Pelvis",
		"RightUpLegRoll","RightUpLeg",
		"RightLeg","RightUpLegRoll",
		"RightLegRoll","RightLeg",
		"RightFoot","RightLegRoll",
		"RightToeBase","RightFoot"
   		};
   	pivotsModel="";
 	};
};

class CfgModels
{
class Default 
{ 
	sections[] = {}; 
	sectionsInherit=""; 
};

class flag_vojak: Default
{
	sections[] = {"latka"};
};
class Head: Default
{
	sections[] =
	{
		"osobnost",
		"brejle"
	};
	skeletonName = "Head";
};
class ArmaMan;
class SJB_SAS_Man: ArmaMan
{
	sections[] =
	{
		"osobnost",
		"Head_Injury",
		"Body_Injury",
		"l_leg_injury",
		"l_arm_injury",
		"r_arm_injury",
		"l_leg_injury",
		"clan_sign",
		"clan"
	};
	sectionsInherit="";
  	[color="Red"]skeletonName = "OFP2_ManSkeleton";[/color]
};
};

I have had no issues what-so-ever using that code, and I know you say you're using the new skeleton when you Binarize, but double check you've not created a new skeleton that you use instead, which I know was an issue I created for myself early on, when I was afraid re-defining the default skeleton would cause issues with compatibility.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×