snap one vtx to another of a different object

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 09 September 2005   #1
snap one vtx to another of a different object

I know one vertex in one object
float $pupil[]=`pointPosition -w pupil.vtx[70]`;

and the vertex in another.
float $eye[]=`pointPosition -w eye.vtx[600]`;

I want to snap the first vertex to the second one with only small difference in the z direction
float $delta=pupil[2] - 1.2

How can I now snap eye to pupil so that eye.vtx[600] get the coordinates of pupil.vtx[70] except in the z axis, where it should get $delta?
 
Old 09 September 2005   #2
use xform...


float $delta = 1.2;
float $pos1[] = `xform -q -ws -t eye.vtx[600]`;
xform -ws -t  $pos1[0] $pos1[1] $delta pupil.vtx[70];


.j
__________________
Make something idiot proof and they'll just build a better idiot
 
Old 09 September 2005   #3
Well, in fact the difference in the z direction would be
$delta = $pos[2] - 1.2
I found that I can also move the whole object 'pupil' with
xform -ws -t $pos1[0] $pos1[1] $delta pupil;

Thanks!
 
Old 09 September 2005   #4
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 04:44 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.