Varanon 892 Posted May 21, 2014 While porting Arma 2 assets for CUP I came upon a problem that I still could not solve: How to keep the commander's or loader's hands on the weapon. I've checked the armed offroad which does just that, and it's model config defines two bones, handle_l and handle_r, that are also named in the config.cpp gunnerLeftHandAnimName = "handle_L"; gunnerRightHandAnimName = "handle_R"; So, them being bones, I assumed that you need two selections of that name, and the gunner will keep his hands there. And indeed, this works in third person, when I move the gun, the gunner's hands stay on the weapon's handle. However, it does not work when switching to first person view. So I supected that maybe handle_L and handle_r are memory points, so I checked the offroad model via elitness (it's binarized and can't be loaded into O2), and I found no selection named handle_l or handle_r in any of the LODS (neither a view lod, nor the Memory LOD)... soo.... remove the handle_* selections from my model, and still the hands follow the gun in third person and not in first person.... Anyone got any idea ? Unfortunately, there is no source material available that illustrates this. Share this post Link to post Share on other sites
sakura_chan 9 Posted May 22, 2014 the AnimName has to be a bone that is defined in the model.cfg. Also, the animation itself needs the IK code to work. Share this post Link to post Share on other sites
warlord554 2065 Posted May 23, 2014 You need to recheck your lods, need to have a proper gunner proxy in all lods, ensure you have a View Gunner LOD, not view pilot Share this post Link to post Share on other sites
Varanon 892 Posted May 23, 2014 the AnimName has to be a bone that is defined in the model.cfg. Also, the animation itself needs the IK code to work. The bones are defined in model.cfg. What dp you mean with the IK code? Sent from my Xperia Z1 Share this post Link to post Share on other sites
Varanon 892 Posted May 23, 2014 You need to recheck your lods, need to have a proper gunner proxy in all lods, ensure you have a View Gunner LOD, not view pilot The View Ginger Lod does exist, and is used for first person turned out commander. I'm all confused about the fact that it works in third person, just not on first person. I also tried different LODs for turning out, no change Sent from my Xperia Z1 Share this post Link to post Share on other sites
Varanon 892 Posted May 23, 2014 Geez, shouldn't type on mobile... View Ginger LOL View GUNNER Sent from my Xperia Z1 Share this post Link to post Share on other sites
da12thMonkey 1943 Posted May 23, 2014 What dp you mean with the IK code? The animation class where your gunner's .rtm animation is defined, needs the leftHandIKCurve[] and rightHandIKCurve[] parameters set to 1. Though if the anim works in 3rd person, I suspect this is already true. Share this post Link to post Share on other sites
warlord554 2065 Posted May 23, 2014 The animation class where your gunner's .rtm animation is defined, needs the leftHandIKCurve[] and rightHandIKCurve[] parameters set to 1.Though if the anim works in 3rd person, I suspect this is already true. Exactly my thoughts Monkey, and it working in third person leads me to think that something simple must be going on, why I was thinking something not the same in the View LOD Share this post Link to post Share on other sites
da12thMonkey 1943 Posted May 23, 2014 Yea, I think it's got to be a discrepancy between the view LOD and some of the other LODs Maybe it's due to one or more of the parent selections of the defined gunner[...]HandAnimName bone, being missing from the model in the view LODs. I'd check whether those view LODs have all the bones that make up the "limb" in cfgSkeletons that contains your handle_L/handle_R bones. Be 100% sure that the names for the selections, match exactly - IIRC the model.cfg is case sensitive, so dropping a capital letter here and there can lead to problems. I think the anim works on the armed offroad even though the handle_L/handle_R bones aren't present as named selection inside the model, because they both have a parent bone called otochlaven_shake, which is in the model. Therefore the "virtual" handle bones follow the motion of their parent as defined by the model.cfg skeleton. Share this post Link to post Share on other sites
Varanon 892 Posted May 26, 2014 The animation class where your gunner's .rtm animation is defined, needs the leftHandIKCurve[] and rightHandIKCurve[] parameters set to 1.Though if the anim works in 3rd person, I suspect this is already true. Yeah, this is already true. Here's the relevant config entry: class M1A1_CommanderOut_settlein: Crew { file="\CUP\Tracked\CUP_Tracked_m1_abrams\anim\M1A1_CommanderOut_settlein.rtm"; speed = -1; looped = "false"; connectTo[] = {"M1A1_CommanderOut", 0.1}; interpolateTo[] = {"KIA_crew_tank01", 1}; variantsAI[] = {"M1A1_CommanderOut", 1}; variantsPlayer[] = {"M1A1_CommanderOut", 1}; variantAfter[] = {1.5, 1.5, 1.5}; useIdles = 0; leftHandIKCurve[] = {0}; rightHandIKCurve[] = {0}; }; class M1A1_CommanderOut: Crew { file="\CUP\Tracked\CUP_Tracked_m1_abrams\anim\M1A1_CommanderOut.rtm"; interpolateTo[] = {"KIA_crew_tank01",1,"M1A1_CommanderIn",1}; speed=-11; leftHandIKCurve[] = {1}; rightHandIKCurve[] = {1}; useIdles = 0; }; ---------- Post added at 01:55 PM ---------- Previous post was at 01:51 PM ---------- Yea, I think it's got to be a discrepancy between the view LOD and some of the other LODs I tried having the commander turn out into another LOD, and even remove the View - Gunner LOD to hav him turn out in the first LOD, but the effect stayed the same. Maybe it's due to one or more of the parent selections of the defined gunner[...]HandAnimName bone, being missing from the model in the view LODs. The M1 has a bit of a wierd skeleton, the first view lod is missing the commander_gun selection (resp it's Czech counterpart) but has the commander_gun_shake selection, which the other LODs are missing. I did add the commander_gun selection to the first LOD though, just to be sure. I'd check whether those view LODs have all the bones that make up the "limb" in cfgSkeletons that contains your handle_L/handle_R bones. Be 100% sure that the names for the selections, match exactly - IIRC the model.cfg is case sensitive, so dropping a capital letter here and there can lead to problems. Hmm, I'll need to check the case of the names (and probably make all names lower case, just to be sure). Thanks for the hint. Share this post Link to post Share on other sites
Varanon 892 Posted May 27, 2014 Just for giggles, I now tried to use the gunner_standup01 pose, which is used on the speedboat and the armed offroad... apart from looking out of place, it exhibits the SAME problems, i.e. works in third person, doesn't work in first person. Share this post Link to post Share on other sites