PDA

View Full Version : matrix way of "in coordsys...move..."


fferro2
08-13-2008, 04:29 PM
I've been searching for here and cannot find nothing about it.

I need to replicate this sentence with matrixes:
in coordsys $Node2 move $Node1 <point3>
This is the solution I get:
$Node1.transform = translate $Node1.transform (transMatrix <point3> * $Node2.transform).translationpart
I guess there will be a cleaner way...
Thanks

TzMtN
08-13-2008, 05:29 PM
Is this what you are looking for?


$Node1.pos += <point3> * $Node2.transform - $Node2.pos

fferro2
08-13-2008, 05:37 PM
thank you TzMtN

fferro2
08-13-2008, 05:53 PM
A better way:
$Node2.pos += <point3> * inverse $Node1.transform

CGTalk Moderation
08-13-2008, 05:53 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.