ManDay 0 Posted July 22, 2007 I'm neither sure whether I got that command right, nor whether I should rather post it in the CFG-Section: I need to get the position of the head of a soldier in either WSS or OSS. Thought selectionPosition in conjunction with the appropriate name out of the translated selections list would work. But it doesnt. player selectionPosition "head" works (just found it out by accident - where is a list of the selections if it isnt the translated one?) but it just returns one constant value regardless whether my character is kneeled, prone or standing. There must be something wrong! Share this post Link to post Share on other sites
DBO_ 0 Posted July 22, 2007 The command just seems to give the position of the selection relative to the model rather than relative to a worldpos , i had same trouble but mandoble made a script to return the pose of a unit using the intersect command. its on ofpec i believe. For the record i tried to take the returned values of this and used modeltoworld with a relpos of [0,0,0] but with no success. Edit of course i used <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player selectionposition "head_hit" Share this post Link to post Share on other sites
ManDay 0 Posted July 22, 2007 A workarround with intersect will be not good for my intent. I need to get the position of the head. Anyone knows a straight working command? Share this post Link to post Share on other sites
ManDay 0 Posted July 22, 2007 Okay, because it so important I need to accept the workarround and got to calculate the headPos based upon vectordir. can you please give me the script? Share this post Link to post Share on other sites
ManDay 0 Posted July 22, 2007 I dont understand the intersect command. It always returns an empty array. Share this post Link to post Share on other sites
DBO_ 0 Posted July 22, 2007 The script is available by mandoble on ofpec and also in scripting thead here on bis forums . Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 22, 2007 The selectionPosition command returns only the inital relative position of the selection (so it returns the rel pos of how it appears in the p3d file), it does not take animations into account. The intersect command probably works the same way so don't expect to get better results with it. Share this post Link to post Share on other sites
Synide 0 Posted July 23, 2007 I don't know if this is useful but here's a list of components that a typical character unit has. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> Component Selections: 90   spine   spine1   spine2   spine3   neck   neck1   head   leftshoulder   lefthand   rightshoulder   righthand   pelvis   weapon   launcher   nvg   leftarm   leftarmroll   leftforearm   leftforearmroll   lefthandindex1   lefthandindex2   lefthandindex3   lefthandmiddle1   lefthandmiddle2   lefthandmiddle3   lefthandring   lefthandpinky1   lefthandpinky2   lefthandpinky3   lefthandring1   lefthandring2   lefthandring3   lefthandthumb1   lefthandthumb2   lefthandthumb3   rightarm   rightarmroll   rightforearm   rightforearmroll   righthandindex1   righthandindex2   righthandindex3   righthandmiddle1   righthandmiddle2   righthandmiddle3   righthandring   righthandpinky1   righthandpinky2   righthandpinky3   righthandring1   righthandring2   righthandring3   righthandthumb1   righthandthumb2   righthandthumb3   leftupleg   leftuplegroll   leftleg   leftlegroll   leftfoot   lefttoebase   rightupleg   rightuplegroll   rightleg   rightlegroll   rightfoot   righttoebase   osobnost   vojak   body_injury   head_injury   llip   rbrow   lbrow   rmouth   lmouth   mmouth   eyelids   mbrow   proxy:\ca\weapons\ak_47_v58_proxy.01   proxy:\ca\weapons\beretta.01   proxy:\ca\weapons\dalekohled_proxy.01   proxy:\ca\weapons\rpg7_proxy.01   proxy:\ca\weapons\nvg_proxy.01   proxy:\ca\characters\flag_vojak.01   r_arm_injury   l_arm_injury   r_leg_injury   l_leg_injury   clan Share this post Link to post Share on other sites
Doolittle 0 Posted July 23, 2007 Wow, that's a lot!! Share this post Link to post Share on other sites
ManDay 0 Posted July 23, 2007 Thanks. I made some further scripts which allow you to check the unitpos. i.e: Up (leaned l/r),Middle (leaned l/r),Down I'll release it with my next mission Share this post Link to post Share on other sites