PDA

View Full Version : Find objects at Given World Position ?


ashishdantu
05-18-2006, 09:00 AM
hi people,

how can i find objects at given world position coordinates ?

target use is like : i want to find out which object (bone) exists at exact opposite side from my chosen one across a given axis. Unfortunately i cant rely on object naming in this case.

find Char_L_Elbow_JNT 's opposite matching bone - how ??

-rgds,

rokandic
05-18-2006, 09:51 AM
I would probably write a script that does the following:
1. Get joint position
2. Get mirror value (xPos*-1)
3. Get all the joints in the scene (ls -type joint)
4. Check distance from mirror value to all the joints
5. Smallest distance joint is your mirror joint

-rok

ashishdantu
05-18-2006, 10:03 AM
hi rokandic,

thanx for the reply, will try to do this .......

but what if there are proxy bones (bones sitting on top of each other ) ?? guess then i'll have to run thru another loop for checking against each bone's parent and child 's world positions too ??

-rgds,

rokandic
05-18-2006, 07:59 PM
Yes, if you have bones sitting on top of each other position is not the only factor to consider. Checking parents, naming conventions, etc.. come into play. You could also add an attribute to different "types" of joints (proxyJoint for instance) then check whether this attribute exists or not and base your selection on that.

-rok

CGTalk Moderation
05-18-2006, 07:59 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.