Jump to content
Sign in to follow this  
ManDay

selectionPosition

Recommended Posts

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

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

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

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

I dont understand the intersect command. It always returns an empty array.

Share this post


Link to post
Share on other sites

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

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×